job "vaultwarden" { datacenters = ["aperture"] type = "service" group "vaultwarden" { count = 1 network { port "http" { to = 80 } port "db" { to = 5432 } } service { name = "vaultwarden" port = "http" tags = [ "traefik.enable=true", "traefik.http.routers.vaultwarden.rule=Host(`vault.redbrick.dcu.ie`)", "traefik.http.routers.vaultwarden.entrypoints=websecure", "traefik.http.routers.vaultwarden.tls.certresolver=lets-encrypt", ] } task "vaultwarden" { driver = "docker" config { image = "vaultwarden/server:latest-alpine" ports = ["http"] volumes = [ "/storage/nomad/${NOMAD_JOB_NAME}:/data", "/etc/localtime:/etc/localtime:ro" ] } template { data = <