job "hedgedoc" { datacenters = ["aperture"] type = "service" group "web" { network { # mode = "bridge" port "http" { to = 3000 } port "db" { to = 5432 } } service { name = "hedgedoc" port = "http" check { type = "http" path = "/_health" interval = "10s" timeout = "2s" } tags = [ "traefik.frontend.headers.STSSeconds=63072000", "traefik.frontend.headers.browserXSSFilter=true", "traefik.frontend.headers.contentTypeNosniff=true", "traefik.enable=true", "traefik.port=${NOMAD_PORT_http}", "traefik.http.routers.md.entrypoints=web,websecure", "traefik.http.routers.md.rule=Host(`md.redbrick.dcu.ie`) || Host(`md.rb.dcu.ie`)", "traefik.http.routers.md.tls.certresolver=lets-encrypt", ] } task "app" { driver = "docker" config { image = "quay.io/hedgedoc/hedgedoc:1.10.2" ports = ["http"] volumes = [ "/storage/nomad/hedgedoc/banner:/hedgedoc/public/banner", ] } template { data = <