From c3e9e6e4f657f5b55759d7aca6fda57f62a8b3c1 Mon Sep 17 00:00:00 2001 From: wizzdom Date: Mon, 19 Feb 2024 03:02:06 +0000 Subject: [PATCH] add shlink job (#26) Co-authored-by: James Hackett --- jobs/services/shlink.hcl | 91 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 jobs/services/shlink.hcl diff --git a/jobs/services/shlink.hcl b/jobs/services/shlink.hcl new file mode 100644 index 0000000..cf61d6c --- /dev/null +++ b/jobs/services/shlink.hcl @@ -0,0 +1,91 @@ +job "shlink" { + datacenters = ["aperture"] + + type = "service" + + group "web" { + network { + port "api" { + to = 8080 + } + port "web" { + to = 8080 + } + } + + service { + name = "shlink" + port = "api" + + tags = [ + "traefik.enable=true", + "traefik.http.routers.shlink-api.rule=Host(`s.rb.dcu.ie`)", + "traefik.http.routers.shlink-api.tls=true", + "traefik.http.routers.shlink-api.tls.certresolver=lets-encrypt", + ] + } + + task "shlink" { + driver = "docker" + + config { + image = "shlinkio/shlink" + ports = ["api"] + } + + template { + data = <