diff --git a/nextcloud.nomad b/nextcloud.nomad new file mode 100644 index 0000000..8a57415 --- /dev/null +++ b/nextcloud.nomad @@ -0,0 +1,157 @@ + +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= <