From ce9e870cd4fe30cf227042f490cdff979482aef3 Mon Sep 17 00:00:00 2001 From: Udo Waechter Date: Fri, 22 Sep 2023 19:33:04 +0200 Subject: [PATCH] traefik for all hosts - yeah to constraints --- _sys/{traeffik.hcl => traefik.hcl} | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) rename _sys/{traeffik.hcl => traefik.hcl} (84%) diff --git a/_sys/traeffik.hcl b/_sys/traefik.hcl similarity index 84% rename from _sys/traeffik.hcl rename to _sys/traefik.hcl index 9312d94..df2c0c9 100644 --- a/_sys/traeffik.hcl +++ b/_sys/traefik.hcl @@ -4,8 +4,12 @@ job "traefik" { type = "service" group "traefik" { - count = 1 - + count = 5 + + constraint { + operator = "distinct_hosts" + value = "true" + } network { port "http" { static = 80 @@ -26,6 +30,10 @@ job "traefik" { interval = "10s" timeout = "2s" } + tags = [ + "traefik.enable=true", + "traefik.http.routers.traefik.rule=Host(`traefik.service.consul`)", + ] } task "traefik" {