diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2022-08-24 21:06:48 +0200 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2022-08-24 21:06:48 +0200 |
commit | 3be2659aa19abfb7e676d33e9e7e1357c790a383 (patch) | |
tree | a1d267a07e86c0be0bdfff92a595ad865105053b /cluster/prod/app/guichet/deploy | |
parent | 243eee4322b8db098b89a13680b1dba2077498b3 (diff) | |
download | nixcfg-3be2659aa19abfb7e676d33e9e7e1357c790a383.tar.gz nixcfg-3be2659aa19abfb7e676d33e9e7e1357c790a383.zip |
Make service addressable by zones
Diffstat (limited to 'cluster/prod/app/guichet/deploy')
-rw-r--r-- | cluster/prod/app/guichet/deploy/directory.hcl | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/cluster/prod/app/guichet/deploy/directory.hcl b/cluster/prod/app/guichet/deploy/directory.hcl new file mode 100644 index 0000000..bfd7e6d --- /dev/null +++ b/cluster/prod/app/guichet/deploy/directory.hcl @@ -0,0 +1,56 @@ +job "guichet" { + datacenters = [ "neptune" ] + type = "service" + priority = 90 + + group "guichet" { + count = 1 + + network { + port "web_port" { to = 9991 } + } + + task "guichet" { + driver = "docker" + config { + image = "superboum/guichet_amd64:15" + readonly_rootfs = true + ports = [ "web_port" ] + volumes = [ + "secrets/config.json:/config.json" + ] + } + + template { + data = file("../config/guichet/config.json.tpl") + destination = "secrets/config.json" + } + + resources { + memory = 200 + } + + service { + name = "guichet" + tags = [ + "guichet", + "tricot guichet-new.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 + } + } + } + } + } +} + |