From 274575bbe50fedc41f995886dc899e31271a510f Mon Sep 17 00:00:00 2001 From: vincent Date: Tue, 10 May 2022 10:34:43 +0200 Subject: [PATCH] add chaine tv --- chainetv.nomad | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 chainetv.nomad diff --git a/chainetv.nomad b/chainetv.nomad new file mode 100644 index 0000000..9b473d2 --- /dev/null +++ b/chainetv.nomad @@ -0,0 +1,43 @@ + +job "chainetv" { + datacenters = ["homelab"] + type = "service" + meta { + forcedeploy = "0" + } + constraint { + attribute = "${attr.cpu.arch}" + value = "amd64" + } + group "chainetv"{ + network { + mode = "host" + port "http" { + to = 5000 + } + } + + task "server" { + driver = "docker" + service { + name = "chainetv" + port = "http" + tags = [ + "traefik.enable=true", + "traefik.http.routers.${NOMAD_JOB_NAME}.rule=Host(`rss.ducamps.win`)&&PathPrefix(`/chainetv`)", + "traefik.http.routers.${NOMAD_JOB_NAME}.tls.domains[0].sans=rss.ducamps.win", + "traefik.http.routers.${NOMAD_JOB_NAME}.tls.certresolver=myresolver", + "traefik.http.routers.${NOMAD_JOB_NAME}.middlewares=chainetv,chainetvStrip", + "traefik.http.middlewares.chainetv.headers.customrequestheaders.X-Script-Name=/chainetv", + "traefik.http.middlewares.chainetvStrip.stripprefix.prefixes=/chainetv", + + ] + } + config { + image = "ducampsv/chainetv:base" + ports = ["http"] + } + } + } + +}