diff --git a/app/traefik/config/traefik.toml b/app/frontend/config/traefik.toml similarity index 100% rename from app/traefik/config/traefik.toml rename to app/frontend/config/traefik.toml diff --git a/app/traefik/deploy/traefik.hcl b/app/frontend/deploy/frontend-traefik.hcl similarity index 100% rename from app/traefik/deploy/traefik.hcl rename to app/frontend/deploy/frontend-traefik.hcl diff --git a/app/tricot/deploy/tricot.hcl b/app/frontend/deploy/frontend-tricot.hcl similarity index 51% rename from app/tricot/deploy/tricot.hcl rename to app/frontend/deploy/frontend-tricot.hcl index ad838a8..01b7097 100644 --- a/app/tricot/deploy/tricot.hcl +++ b/app/frontend/deploy/frontend-tricot.hcl @@ -1,26 +1,33 @@ -job "tricot" { +job "frontend" { datacenters = ["dc1", "neptune"] type = "system" priority = 90 - constraint { - attribute = "${attr.cpu.arch}" - value = "amd64" - } - update { - max_parallel = 1 + max_parallel = 1 stagger = "1m" } group "tricot" { - task "tricot" { + network { + port "http_port" { static = 80 } + port "https_port" { static = 443 } + port "admin_port" { static = 8082 } + } + + task "server" { driver = "docker" config { image = "lxpz/amd64_tricot:4" network_mode = "host" readonly_rootfs = true + ports = [ "http_port", "https_port", "admin_port" ] + } + + resources { + cpu = 1000 + memory = 100 } restart { @@ -40,8 +47,18 @@ EOH env = true } - resources { - memory = 40 + service { + name = "tricot-http" + port = "http_port" + tags = [ "(diplonat (tcp_port 80))" ] + address_mode = "host" + } + + service { + name = "tricot-https" + port = "https_port" + tags = [ "(diplonat (tcp_port 443))" ] + address_mode = "host" } } }