job "supysonic" { datacenters = ["homelab"] type = "service" meta { forcedeploy = "0" } constraint { attribute = "${attr.cpu.arch}" value = "amd64" } group "supysonic" { network { mode = "host" port "fcgi" { to = 5000 } port "http" { to = 80 } } vault { policies = ["access-tables"] } 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.win", "traefik.enable=true", "traefik.http.routers.${NOMAD_JOB_NAME}.rule=Host(`${NOMAD_JOB_NAME}.ducamps.win`)", "traefik.http.routers.${NOMAD_JOB_NAME}.tls.domains[0].sans=${NOMAD_JOB_NAME}.ducamps.win", "traefik.http.routers.${NOMAD_JOB_NAME}.tls.certresolver=myresolver", ] } task "supysonic-frontend" { driver = "docker" config { image = "nginx:alpine" ports = [ "http" ] volumes = [ "etc/nginx/nginx.conf:/etc/nginx/nginx.conf", ] } template { data = <