job "supysonic" { datacenters = ["homelab"] priority = 90 type = "service" meta { forcedeploy = "1" } constraint { attribute = "${attr.cpu.arch}" value = "amd64" } constraint { attribute = "${node.class}" operator = "set_contains" value = "cluster" } group "supysonic" { network { mode = "host" port "fcgi" { to = 5000 } port "http" { to = 80 } } vault { policies = ["supysonic"] } service { name = "supysonic" port = "http" tags = [ "homer.enable=true", "homer.name=Supysonic", "homer.service=Application", "homer.icon=fas fa-headphones", "homer.target=_blank", "homer.url=http://${NOMAD_JOB_NAME}.ducamps.eu", "traefik.enable=true", "traefik.http.routers.${NOMAD_JOB_NAME}.rule=Host(`${NOMAD_JOB_NAME}.ducamps.eu`)", "traefik.http.routers.${NOMAD_JOB_NAME}.tls.domains[0].sans=${NOMAD_JOB_NAME}.ducamps.eu", "traefik.http.routers.${NOMAD_JOB_NAME}.tls.certresolver=myresolver", "traefik.http.routers.${NOMAD_JOB_NAME}.entrypoints=web,websecure", ] } task "supysonic-frontend" { driver = "docker" config { image = "nginx:alpine" ports = [ "http" ] volumes = [ "etc/nginx/nginx.conf:/etc/nginx/nginx.conf", ] } template { data = <