job "minihass" { constraint { attribute = "${attr.cpu.arch}" operator = "!=" value = "armhf" } datacenters = ["dc1"] group "smart-home" { network { mode = "host" port "http" { to = 5000 } } service { name = "minihass" port = "http" tags = [ "traefik.http.routers.minihasslan.rule=Host(`minihass.service.dc1.consul`)", "traefik.http.routers.minihasswan.rule=Host(`mh.fbleagh.duckdns.org`)", "traefik.http.routers.minihasswan.middlewares=dex@consulcatalog", "traefik.http.routers.minihasswan.tls=true", ] check { type = "http" path = "/health" interval = "30s" timeout = "7s" } } task "app" { driver = "docker" config { image = "ghcr.io/sstent/minihass" ports = ["http"] } env { CONSUL_HOST = "consul.service.dc1.consul" CONSUL_PORT = "8500" } resources { cpu = 500 memory = 256 } } } }