add chaine tv

This commit is contained in:
vincent 2022-05-10 10:34:43 +02:00
parent e0b862a401
commit 274575bbe5

43
chainetv.nomad Normal file
View File

@ -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"]
}
}
}
}