From 178338af00507c89c735b2a9b1f8aef6aac4ceb5 Mon Sep 17 00:00:00 2001 From: Gavin Holahan Date: Sun, 26 Jan 2025 17:13:20 +0000 Subject: [PATCH] Works but cooked --- jobs/services/mixpost.hcl | 137 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 jobs/services/mixpost.hcl diff --git a/jobs/services/mixpost.hcl b/jobs/services/mixpost.hcl new file mode 100644 index 0000000..0c7698f --- /dev/null +++ b/jobs/services/mixpost.hcl @@ -0,0 +1,137 @@ +job "mixpost" { + datacenters = ["aperture"] + type = "service" + + group "mixpost" { + network { + port "http" { + to = 80 + } + + port "redis" { + to = 6379 + } + + port "db" { + to = 3306 + } + } + + service { + name = "mixpost" + port = "http" + + tags = [ + "traefik.enable=true", + "traefik.port=${NOMAD_PORT_http}", + "traefik.http.routers.mixpost.rule=Host(`mixpost.redbrick.dcu.ie`)", + "traefik.http.routers.mixpost.entrypoints=web,websecure", + "traefik.http.routers.mixpost.tls.certresolver=lets-encrypt", + "traefik.http.routers.mixpost.tls.certresolver=mytlschallenge", + "traefik.http.middlewares.mixpost.headers.SSLRedirect=true", + "traefik.http.middlewares.mixpost.headers.STSSeconds=315360000", + "traefik.http.middlewares.mixpost.headers.browserXSSFilter=true", + "traefik.http.middlewares.mixpost.headers.contentTypeNosniff=true", + "traefik.http.middlewares.mixpost.headers.forceSTSHeader=true", + "traefik.http.middlewares.mixpost.headers.SSLHost=`${APP_DOMAIN}`", + "traefik.http.middlewares.mixpost.headers.STSIncludeSubdomains=true", + "traefik.http.middlewares.mixpost.headers.STSPreload=true" + ] + } + + + task "mixpost" { + driver = "docker" + + config { + image = "inovector/mixpost:latest" + ports = ["http"] + } + + template { + data = <