job "traefik" { group "traefik" { network { mode = "bridge" port "http" { static = 80 } port "https" { static = 443 } port "api" { static = 8081 } } service { connect { sidecar_service { proxy { upstreams { destination_name = "auth" local_bind_port = 9091 } } } } } service { name = "traefik" port = "api" tags = [ "traefik.enable=true", "traefik.http.routers.traefik.rule=Host(`traefik.othrayte.one`)", "traefik.http.routers.traefik.service=traefik", "traefik.http.routers.traefik.middlewares=auth@file", "traefik.http.services.traefik.loadbalancer.server.port=8081", ] check { name = "alive" type = "tcp" port = "api" interval = "10s" timeout = "2s" } } volume "traefik" { type = "host" read_only = false source = "traefik" } task "traefik" { driver = "docker" config { image = "traefik:v3.3" ports = ["http", "https", "api"] volumes = [ "local/traefik.yml:/etc/traefik/traefik.yml", "local/configs/:/etc/traefik/configs/" ] } volume_mount { volume = "traefik" destination = "/opt/traefik" read_only = false } template { data = <