2020-09-21 14:29:49 +00:00
|
|
|
job "plume" {
|
|
|
|
datacenters = ["dc1"]
|
|
|
|
type = "service"
|
|
|
|
|
|
|
|
constraint {
|
|
|
|
attribute = "${attr.cpu.arch}"
|
|
|
|
value = "amd64"
|
|
|
|
}
|
|
|
|
|
|
|
|
group "plume" {
|
|
|
|
count = 1
|
2020-12-25 10:48:52 +00:00
|
|
|
|
|
|
|
network {
|
|
|
|
port "web_port" { }
|
|
|
|
}
|
|
|
|
|
2020-09-21 14:29:49 +00:00
|
|
|
task "plume" {
|
|
|
|
driver = "docker"
|
|
|
|
config {
|
2021-04-19 08:50:38 +00:00
|
|
|
image = "superboum/plume:v3"
|
2020-10-28 15:55:11 +00:00
|
|
|
network_mode = "host"
|
2020-12-25 10:48:52 +00:00
|
|
|
ports = [ "web_port" ]
|
2020-09-21 14:29:49 +00:00
|
|
|
#command = "cat"
|
|
|
|
#args = [ "/dev/stdout" ]
|
|
|
|
volumes = [
|
|
|
|
"/mnt/glusterfs/plume/media:/app/static/media",
|
|
|
|
"/mnt/glusterfs/plume/search:/app/search_index"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
template {
|
2021-01-16 16:07:01 +00:00
|
|
|
data = file("../config/app.env")
|
2020-09-21 14:29:49 +00:00
|
|
|
destination = "secrets/app.env"
|
|
|
|
env = true
|
|
|
|
}
|
|
|
|
|
|
|
|
resources {
|
|
|
|
memory = 100
|
|
|
|
cpu = 100
|
|
|
|
}
|
|
|
|
|
|
|
|
service {
|
|
|
|
name = "plume"
|
|
|
|
tags = [
|
|
|
|
"plume",
|
|
|
|
"traefik.enable=true",
|
|
|
|
"traefik.frontend.entryPoints=https,http",
|
|
|
|
"traefik.frontend.rule=Host:plume.deuxfleurs.fr",
|
|
|
|
]
|
2020-12-25 10:48:52 +00:00
|
|
|
port = "web_port"
|
|
|
|
address_mode = "host"
|
2020-09-21 14:29:49 +00:00
|
|
|
check {
|
2020-12-28 09:49:09 +00:00
|
|
|
type = "http"
|
|
|
|
protocol = "http"
|
2020-12-25 10:48:52 +00:00
|
|
|
port = "web_port"
|
2020-12-28 09:49:09 +00:00
|
|
|
path = "/"
|
2020-09-21 14:29:49 +00:00
|
|
|
interval = "60s"
|
|
|
|
timeout = "5s"
|
|
|
|
check_restart {
|
|
|
|
limit = 3
|
|
|
|
grace = "600s"
|
|
|
|
ignore_warnings = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|