job "nextcloud" { datacenters = ["homelab"] type = "service" meta { forcedeploy = "0" } group "nextcloud"{ network { mode = "host" port "http" { to = 80 } } vault{ policies= ["access-table"] } task "server" { driver = "docker" service { name = "nextcloud" port = "http" tags = [ "traefik.enable=true", "traefik.http.routers.${NOMAD_JOB_NAME}.rule=Host(`file.ducamps.win`)", "traefik.http.routers.${NOMAD_JOB_NAME}.tls.domains[0].sans=file.ducamps.win", "traefik.http.routers.${NOMAD_JOB_NAME}.tls.certresolver=myresolver", ] } config { image = "nextcloud:latest" ports = ["http"] volumes = [ "/mnt/diskstation/nextcloud:/data" "local/default:/config/nginx/site-confs/default" ] } env { } template { data= <