From fd122c629741828c6c25a3c976ae13ad5b869487 Mon Sep 17 00:00:00 2001 From: wizzdom Date: Tue, 20 Feb 2024 03:46:31 +0000 Subject: [PATCH] add vaultwarden job (#29) Co-authored-by: James Hackett --- jobs/services/vaultwarden.hcl | 68 +++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 jobs/services/vaultwarden.hcl 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 = <