job "pacoloco" { datacenters = ["homelab"] priority = 50 type = "service" meta { forcedeploy = "0" } constraint { attribute = "${node.class}" operator = "set_contains" value = "cluster" } group "pacoloco" { network { mode = "host" port "http" { to = 9129 } } task "pacoloco-server" { driver = "docker" service { name = "pacoloco" port = "http" tags = [ "traefik.enable=true", "traefik.http.routers.${NOMAD_JOB_NAME}.rule=Host(`arch.ducamps.eu`)", "traefik.http.routers.${NOMAD_JOB_NAME}.tls.domains[0].sans=arch.ducamps.eu", "traefik.http.routers.${NOMAD_JOB_NAME}.tls.certresolver=myresolver", "traefik.http.routers.${NOMAD_JOB_NAME}.entrypoints=web,websecure", ] } config { image = "ducampsv/pacoloco" ports = ["http"] volumes = [ "/mnt/diskstation/nomad/pacoloco:/var/cache/pacoloco", "local/pacoloco.yaml:/etc/pacoloco.yaml" ] } template { data = <