infrastructure/app/plume/deploy/plume.hcl

77 lines
1.5 KiB
HCL
Raw Normal View History

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" {
2022-01-27 12:31:25 +00:00
constraint {
attribute = "${attr.unique.hostname}"
operator = "="
value = "digitale"
}
2020-09-21 14:29:49 +00:00
driver = "docker"
config {
2022-01-27 12:31:25 +00:00
image = "superboum/plume:v7"
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 = [
2022-01-27 12:31:25 +00:00
"/mnt/ssd/plume/search_index:/app/search_index",
"/mnt/ssd/plume/media:/app/static/media"
2020-09-21 14:29:49 +00:00
]
}
template {
data = file("../config/app.env")
2020-09-21 14:29:49 +00:00
destination = "secrets/app.env"
env = true
}
resources {
2021-09-30 20:23:17 +00:00
memory = 500
2020-09-21 14:29:49 +00:00
cpu = 100
}
service {
name = "plume"
tags = [
"plume",
"traefik.enable=true",
"traefik.frontend.entryPoints=https,http",
"traefik.frontend.rule=Host:plume.deuxfleurs.fr",
2021-12-08 11:42:48 +00:00
"tricot plume.deuxfleurs.fr",
2020-09-21 14:29:49 +00:00
]
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
}
}
}
}
}
}