job "moneymaker" { region = "global" datacenters = ["dc1"] type = "service" update { stagger = "30s" max_parallel = 1 canary = 1 min_healthy_time = "10s" healthy_deadline = "5m" auto_revert = true auto_promote = true progress_deadline = "10m" } group "app" { count = 1 network { port "http" {} } reschedule { attempts = 5 interval = "10m" delay = "30s" delay_function = "exponential" max_delay = "120s" unlimited = false } constraint { attribute = "${node.unique.name}" value = "int" } service { provider = "consul" name = "moneymaker" port = "http" tags = [ "traefik.enable=true", "traefik.http.routers.moneymaker.rule=Host(`mmd.i80.dk`)", "traefik.http.routers.moneymaker.tls=true", ] check { name = "http_health_check" type = "http" path = "/health" interval = "10s" timeout = "5s" check_restart { limit = 3 grace = "30s" } } } # -- Dashboard (Flask web app) ---------------------------------------- task "web" { driver = "docker" config { image = "registry.i80.dk/gitea/mmd:latest" ports = ["http"] force_pull = true volumes = ["/opt/nomad/volumes/moneymaker-data:/app/data"] } restart { attempts = 10 interval = "10m" delay = "10s" mode = "fail" } template { data = <