job "paperless" { datacenters = ["aperture"] type = "service" group "paperless-web" { network { port "http" { to = 8000 } port "redis" { to = 6379 } port "db" { to = 5432 } } service { name = "paperless" port = "http" check { type = "http" path = "/" interval = "10s" timeout = "2s" } tags = [ "traefik.enable=true", "traefik.http.routers.paperless.rule=Host(`paperless.redbrick.dcu.ie`) || Host(`paperless.rb.dcu.ie`)", "traefik.http.routers.paperless.entrypoints=websecure", "traefik.http.routers.paperless.tls=true", "traefik.http.routers.paperless.tls.certresolver=lets-encrypt", "traefik.http.middlewares.paperless.headers.contentSecurityPolicy=default-src 'self'; img-src 'self' data:" ] } task "web" { driver = "docker" config { image = "ghcr.io/paperless-ngx/paperless-ngx:latest" ports = ["http"] volumes = [ "/storage/nomad/paperless/consume:/usr/src/paperless/consume", "/storage/nomad/paperless/data:/usr/src/paperless/data", "/storage/nomad/paperless/media:/usr/src/paperless/media", "/storage/nomad/paperless/export:/usr/src/paperless/export", "/storage/nomad/paperless/preconsume:/usr/src/paperless/preconsume", ] } template { data = <