diff --git a/jobs/services/vaultwarden.hcl b/jobs/services/vaultwarden.hcl new file mode 100644 index 0000000..66c5c9c --- /dev/null +++ b/jobs/services/vaultwarden.hcl @@ -0,0 +1,68 @@ +job "vaultwarden" { + datacenters = ["aperture"] + type = "service" + + group "vaultwarden" { + count = 1 + + network { + port "http" { + to = 80 + } + } + + 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/vaultwarden:/data" + ] + } + + template { + data = <