diff --git a/supysonic.nomad b/supysonic.nomad index 3a97df5..842a8bd 100644 --- a/supysonic.nomad +++ b/supysonic.nomad @@ -13,38 +13,84 @@ job "supysonic" { group "supysonic"{ network { mode = "host" - port "http" { + port "fcgi" { to = 5000 } + port "http" { + to=80 + } } vault{ policies= ["access-tables"] } - task "server" { + service { + name = "supysonic" + port = "http" + tags = [ + "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 "frontend" { driver = "docker" - service { - name = "supysonic" - port = "http" - tags = [ - "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", - - + config { + image= "nginx:alpine" + ports= [ + "http" + ] + volumes = [ + "etc/nginx/nginx.conf:/etc/nginx/nginx.conf", ] } + template { + data = <