job "www" { datacenters = ["hetzner"] priority = 90 type = "service" group "www" { network { mode = "host" port "http" { to = 80 host_network = "private" } } service { name = "www" tags = [ "homer.enable=true", "homer.name=Website", "homer.service=Application", "homer.icon=fas fa-blog", "homer.target=_blank", "homer.url=https://www.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", "traefik.http.routers.default.rule=Host(`ducamps.eu`)", "traefik.http.routers.default.entrypoints=web,websecure", "traefik.http.routers.default.tls.domains[0].sans=ducamps.eu", "traefik.http.routers.default.tls.certresolver=myresolver", ] port = "http" } task "server" { driver = "docker" config { image = "nginx" ports = [ "http" ] volumes = [ "local/nginx.conf:/etc/nginx/nginx.conf", "/srv/http/welcome:/usr/share/nginx/html/welcome", "/mnt/diskstation/nomad/archiso:/usr/share/nginx/html/archiso" ] } template { data = <