homelab/nomad-job/decom/plex.nomad

51 lines
1009 B
Plaintext
Raw Permalink Normal View History

2022-08-26 07:31:58 +00:00
job "plex" {
datacenters = ["homelab"]
type = "service"
meta {
forcedeploy = "0"
}
constraint {
attribute = "${attr.cpu.arch}"
value = "amd64"
}
group "plex"{
network {
mode = "host"
port "http" {
static = 32400
}
}
task "plex" {
driver = "docker"
service {
name = "plex"
port = "http"
tags = [
"traefik.enable=true",
2023-11-05 18:08:17 +00:00
"traefik.http.routers.${NOMAD_JOB_NAME}.rule=Host(`${NOMAD_JOB_NAME}.ducamps.eu`)",
"traefik.http.routers.${NOMAD_JOB_NAME}.tls.domains[0].sans=${NOMAD_JOB_NAME}.ducamps.eu",
2022-08-26 07:31:58 +00:00
"traefik.http.routers.${NOMAD_JOB_NAME}.tls.certresolver=myresolver",
]
}
config {
image = "plexinc/pms-docker"
ports = ["http"]
volumes = [
"/mnt/diskstation/nomad/plex/config:/config",
"/mnt/diskstation/media/:/data"
]
}
resources {
memory = 300
}
}
}
}