From 808451749c03b712e52a90681cf9e08d8afcd31d Mon Sep 17 00:00:00 2001 From: Ayden Date: Wed, 11 Sep 2024 23:26:54 +0100 Subject: [PATCH] Pretix: add pretix job for dcu solar racing (#55) Co-authored-by: wizzdom Co-authored-by: wizzdom --- jobs/socs/dcusr-pretix.hcl | 137 +++++++++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 jobs/socs/dcusr-pretix.hcl diff --git a/jobs/socs/dcusr-pretix.hcl b/jobs/socs/dcusr-pretix.hcl new file mode 100644 index 0000000..0186a0a --- /dev/null +++ b/jobs/socs/dcusr-pretix.hcl @@ -0,0 +1,137 @@ +job "dcusr-pretix" { + datacenters = ["aperture"] + + type = "service" + + meta { + domain = "tickets.solarracing.ie" + } + + group "web" { + network { + # mode = "bridge" + port "http" { + to = 80 + } + + port "db" { + to = 5432 + } + + port "redis" { + to = 6379 + } + } + + service { + name = "pretix-web" + port = "http" + + tags = [ + "traefik.enable=true", + "traefik.port=${NOMAD_PORT_http}", + "traefik.http.routers.pretix.entrypoints=web,websecure", + "traefik.http.routers.pretix.rule=Host(`${NOMAD_META_domain}`)", + "traefik.http.routers.pretix.tls=true", + "traefik.http.routers.pretix.tls.certresolver=lets-encrypt", + ] + } + + task "pretix" { + driver = "docker" + + config { + image = "pretix/standalone:stable" + ports = ["http"] + + volumes = [ + "local/pretix.cfg:/etc/pretix/pretix.cfg", + "/storage/nomad/pretix/data:/data", + "/etc/timezone:/etc/timezone:ro", + ] + + } + + resources { + memory = 5000 + cores = 1 + } + env { + NUM_WORKERS = 1 + } + + template { + data = <