diff --git a/jobs/services/rally.hcl b/jobs/services/rally.hcl new file mode 100644 index 0000000..ee274a0 --- /dev/null +++ b/jobs/services/rally.hcl @@ -0,0 +1,121 @@ +job "rally" { + datacenters = ["aperture"] + type = "service" + + group "rally-web" { + network { + port "http" { + to = 3000 + } + port "db" { + to = 5432 + } + } + + service { + name = "rally" + port = "http" + + check { + type = "http" + path = "/" + interval = "10s" + timeout = "2s" + } + + tags = [ + "traefik.enable=true", + "traefik.http.routers.rally.rule=Host(`vote.rb.dcu.ie`)", + "traefik.http.routers.rally.entrypoints=websecure", + "traefik.http.routers.rally.tls=true", + "traefik.http.routers.rally.tls.certresolver=lets-encrypt", + ] + } + + task "web" { + driver = "docker" + + config { + image = "lukevella/rallly:latest" + ports = ["http"] + } + + template { + data = <