diff --git a/jobs/services/pretix.hcl b/jobs/services/pretix.hcl new file mode 100644 index 0000000..929275e --- /dev/null +++ b/jobs/services/pretix.hcl @@ -0,0 +1,154 @@ +job "pretix" { + datacenters = ["aperture"] + + type = "service" + + group "web" { + network { + # mode = "bridge" + port "http" { + to = 80 + } + + port "db" { + to = 5432 + static = 5432 + } + + port "redis" { + to = 6379 + } + } + + service { + name = "pretix" + port = "http" + + # check { + # type = "http" + # path = "/" + # interval = "10s" + # timeout = "2s" + # } + + tags = [ + "traefik.enable=true", + "traefik.port=${NOMAD_PORT_http}", + "traefik.http.routers.pretix.rule=Host(`tickets.solarracing.ie`)", + "traefik.http.routers.pretix.tls=true", + "traefik.http.routers.pretix.tls.certresolver=lets-encrypt", + ] + } + + task "app" { + driver = "docker" + + config { + image = "pretix/standalone:stable" + ports = ["http"] + + volumes = [ + "local/pretix.cfg:/etc/pretix/pretix.cfg", + "/storage/nomad/pretix/data:/data" + ] + + } + + resources { + memory = 15000 + } + + template { + data = <