Migrate plume+diagnet+web_static

This commit is contained in:
Quentin 2020-12-28 10:49:09 +01:00
parent 48db0185a4
commit a2f8e11d06
3 changed files with 22 additions and 23 deletions

View file

@ -50,8 +50,10 @@ job "plume" {
port = "web_port" port = "web_port"
address_mode = "host" address_mode = "host"
check { check {
type = "tcp" type = "http"
protocol = "http"
port = "web_port" port = "web_port"
path = "/"
interval = "60s" interval = "60s"
timeout = "5s" timeout = "5s"
check_restart { check_restart {

View file

@ -9,6 +9,10 @@ job "science" {
} }
group "diagnet" { group "diagnet" {
network {
port "web_port" { to = 8000 }
}
task "main" { task "main" {
driver = "docker" driver = "docker"
config { config {
@ -18,17 +22,12 @@ job "science" {
"-chrome", "-chrome-interval", "60m", "-chrome", "-chrome-interval", "60m",
"-http", ":8000" "-http", ":8000"
] ]
port_map { ports = [ "web_port" ]
web_port = 8000
}
} }
resources { resources {
cpu = 1000 cpu = 1000
memory = 1200 memory = 1200
network {
port "web_port" {}
}
} }
service { service {

View file

@ -8,13 +8,15 @@ job "web_static" {
} }
group "landing" { group "landing" {
network {
port "deuxfleurs_port" { to = 8080 }
}
task "server" { task "server" {
driver = "docker" driver = "docker"
config { config {
image = "superboum/amd64_webpull_pug:v4" image = "superboum/amd64_webpull_pug:v4"
port_map { ports = [ "deuxfleurs_port" ]
web_port = 8080
}
} }
template { template {
@ -28,9 +30,6 @@ EOH
resources { resources {
memory = 200 memory = 200
network {
port "web_port" {}
}
} }
service { service {
@ -41,12 +40,12 @@ EOH
"traefik.frontend.rule=Host:deuxfleurs.fr,www.deuxfleurs.fr,deuxfleurs.org,www.deuxfleurs.org;PathPrefix:/", "traefik.frontend.rule=Host:deuxfleurs.fr,www.deuxfleurs.fr,deuxfleurs.org,www.deuxfleurs.org;PathPrefix:/",
"traefik.frontend.priority=10" "traefik.frontend.priority=10"
] ]
port = "web_port" port = "deuxfleurs_port"
address_mode = "host" address_mode = "host"
name = "landing" name = "landing"
check { check {
type = "tcp" type = "tcp"
port = "web_port" port = "deuxfleurs_port"
interval = "60s" interval = "60s"
timeout = "5s" timeout = "5s"
check_restart { check_restart {
@ -60,13 +59,15 @@ EOH
} }
group "quentin" { group "quentin" {
network {
port "quentin_port" { to = 8080 }
}
task "server" { task "server" {
driver = "docker" driver = "docker"
config { config {
image = "superboum/amd64_webpull_ruby:v1" image = "superboum/amd64_webpull_ruby:v1"
port_map { ports = [ "quentin_port" ]
web_port = 8080
}
} }
template { template {
@ -80,9 +81,6 @@ EOH
resources { resources {
memory = 500 memory = 500
network {
port "web_port" {}
}
} }
service { service {
@ -92,12 +90,12 @@ EOH
"traefik.frontend.entryPoints=https", "traefik.frontend.entryPoints=https",
"traefik.frontend.rule=Host:quentin.dufour.io,www.quentin.dufour.io;PathPrefix:/" "traefik.frontend.rule=Host:quentin.dufour.io,www.quentin.dufour.io;PathPrefix:/"
] ]
port = "web_port" port = "quentin_port"
address_mode = "host" address_mode = "host"
name = "blog-quentin" name = "blog-quentin"
check { check {
type = "tcp" type = "tcp"
port = "web_port" port = "quentin_port"
interval = "60s" interval = "60s"
timeout = "5s" timeout = "5s"
check_restart { check_restart {