This repository has been archived on 2023-03-15. You can view files and clone it, but cannot push or open issues or pull requests.
infrastructure/app/bagage/deploy/bagage.hcl

60 lines
1.1 KiB
HCL
Raw Normal View History

2021-08-20 15:39:07 +00:00
job "bagage" {
2019-12-04 15:50:03 +00:00
datacenters = ["dc1"]
type = "service"
2021-08-20 15:39:07 +00:00
priority = 90
2019-12-04 15:50:03 +00:00
constraint {
attribute = "${attr.cpu.arch}"
value = "amd64"
}
2021-08-20 15:39:07 +00:00
group "main" {
count = 1
2020-12-28 09:49:09 +00:00
network {
2021-08-20 15:39:07 +00:00
port "web_port" { to = 8080 }
2020-12-28 09:49:09 +00:00
}
2021-08-20 15:39:07 +00:00
task "server" {
2019-12-04 15:50:03 +00:00
driver = "docker"
config {
2021-09-03 09:02:22 +00:00
image = "superboum/amd64_bagage:v7"
2021-08-20 15:39:07 +00:00
readonly_rootfs = true
2020-12-28 09:49:09 +00:00
ports = [ "web_port" ]
2019-12-04 15:50:03 +00:00
}
2021-08-20 15:39:07 +00:00
env {
BAGAGE_LDAP_ENDPOINT = "bottin2.service.2.cluster.deuxfleurs.fr:389"
}
2019-12-04 15:50:03 +00:00
resources {
2021-09-03 09:02:22 +00:00
memory = 300
2019-12-04 15:50:03 +00:00
}
service {
2021-08-20 15:39:07 +00:00
name = "bagage"
2019-12-04 15:50:03 +00:00
tags = [
2021-08-20 15:39:07 +00:00
"bagage",
2019-12-04 15:50:03 +00:00
"traefik.enable=true",
"traefik.frontend.entryPoints=https,http",
2021-08-20 15:39:07 +00:00
"traefik.frontend.rule=Host:bagage.deuxfleurs.fr",
2019-12-04 15:50:03 +00:00
]
port = "web_port"
address_mode = "host"
check {
type = "tcp"
port = "web_port"
interval = "60s"
timeout = "5s"
check_restart {
limit = 3
grace = "90s"
ignore_warnings = false
}
}
}
}
}
}