From c74dc92febd1841c8ea5ff31caab0f941d57527d Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sat, 16 Jan 2021 17:07:01 +0100 Subject: Proposal: reorganize app/ folder by modules --- app/science/deploy/science.hcl | 58 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 app/science/deploy/science.hcl (limited to 'app/science/deploy') diff --git a/app/science/deploy/science.hcl b/app/science/deploy/science.hcl new file mode 100644 index 0000000..1aee7a8 --- /dev/null +++ b/app/science/deploy/science.hcl @@ -0,0 +1,58 @@ +job "science" { + datacenters = ["dc1"] + type = "service" + priority = 10 + + constraint { + attribute = "${attr.cpu.arch}" + value = "amd64" + } + + group "diagnet" { + network { + port "web_port" { to = 8000 } + } + + task "main" { + driver = "docker" + config { + image = "lesterpig/diagnet-landmark:latest" + args = [ + "-name", "landmark-deuxfleurs", + "-chrome", "-chrome-interval", "60m", + "-http", ":8000" + ] + ports = [ "web_port" ] + } + + resources { + cpu = 1000 + memory = 1200 + } + + service { + tags = [ + "diagnet", + "traefik.enable=true", + "traefik.frontend.entryPoints=https,http", + "traefik.frontend.rule=Host:diagnet.science.deuxfleurs.fr;PathPrefix:/" + ] + port = "web_port" + address_mode = "host" + name = "diagnet" + check { + type = "tcp" + port = "web_port" + interval = "60s" + timeout = "5s" + check_restart { + limit = 3 + grace = "90s" + ignore_warnings = false + } + } + } + } + } +} + -- cgit v1.2.3