diff options
author | Quentin <quentin@deuxfleurs.fr> | 2021-08-20 17:39:07 +0200 |
---|---|---|
committer | Quentin <quentin@deuxfleurs.fr> | 2021-08-20 17:39:07 +0200 |
commit | d40c41004d0f234140f5ec9fc029f4ef6ce3f60c (patch) | |
tree | aea37ac5804b3e2c159a8ce755b6b2db002048c1 /app/bagage | |
parent | 09269e8497793f97398ace2ebe7f2b70777788c8 (diff) | |
download | infrastructure-d40c41004d0f234140f5ec9fc029f4ef6ce3f60c.tar.gz infrastructure-d40c41004d0f234140f5ec9fc029f4ef6ce3f60c.zip |
Add bagage deployment
Diffstat (limited to 'app/bagage')
-rw-r--r-- | app/bagage/deploy/bagage.hcl | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/app/bagage/deploy/bagage.hcl b/app/bagage/deploy/bagage.hcl new file mode 100644 index 0000000..2c8884b --- /dev/null +++ b/app/bagage/deploy/bagage.hcl @@ -0,0 +1,59 @@ +job "bagage" { + datacenters = ["dc1"] + type = "service" + priority = 90 + + constraint { + attribute = "${attr.cpu.arch}" + value = "amd64" + } + + group "main" { + count = 1 + + network { + port "web_port" { to = 8080 } + } + + task "server" { + driver = "docker" + config { + image = "superboum/amd64_bagage:v5" + readonly_rootfs = true + ports = [ "web_port" ] + } + + env { + BAGAGE_LDAP_ENDPOINT = "bottin2.service.2.cluster.deuxfleurs.fr:389" + } + + resources { + memory = 100 + } + + service { + name = "bagage" + tags = [ + "bagage", + "traefik.enable=true", + "traefik.frontend.entryPoints=https,http", + "traefik.frontend.rule=Host:bagage.deuxfleurs.fr", + ] + 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 + } + } + } + } + } +} + |