job "lifefaq" { region = "global" datacenters = ["dc1"] type = "service" meta { uuid = uuidv4() deployed_at = "[[ timeNowUTC ]]" } update { max_parallel = 1 canary = 2 auto_revert = false min_healthy_time = "10s" healthy_deadline = "10m" auto_promote = true progress_deadline = "15m" } group "lifefaq-group" { count = 2 network { port "http" { } } constraint { attribute = "${node.unique.name}" value = "autobox.i80.dk" } reschedule { attempts = 5 interval = "10m" delay = "30s" delay_function = "exponential" max_delay = "120s" unlimited = false } service { provider = "consul" name = "lifefaq" port = "http" tags = [ "traefik.enable=true", "traefik.http.routers.lifefaq.rule=Host(`lifefaq.i80.dk`)", "traefik.http.routers.lifefaq.tls=true" ] check { address_mode = "host" name = "http_health_check" type = "http" path = "/health" interval = "10s" timeout = "5s" } } task "lifefaq-task" { driver = "docker" config { image = "registry.i80.dk/gitea/lifefaq:latest" ports = ["http"] force_pull = true auth { username = "robot$gitserver" password = "${HARBOR_ROBOT_TOKEN}" } } restart { attempts = 10 interval = "10m" delay = "10s" mode = "fail" } env { APP_ENV = "production" PORT = "${NOMAD_PORT_http}" HOST = "0.0.0.0" } template { data = <