homelab/nomad-job/jellyfin.nomad

58 lines
1.3 KiB
Plaintext
Raw Normal View History

2022-08-07 08:59:39 +00:00
job "jellyfin" {
datacenters = ["homelab"]
type = "service"
meta {
forcedeploy = "0"
}
constraint {
attribute = "${attr.cpu.arch}"
value = "amd64"
}
group "jellyfin"{
network {
mode = "host"
port "http" {
to = 8096
}
}
task "jellyfin" {
driver = "docker"
service {
name = "jellyfin"
port = "http"
2022-08-10 17:31:23 +00:00
tags = [
"homer.enable=true",
"homer.name=jellyfin",
"homer.service=Application",
"homer.target=_blank",
"homer.logo=https://${NOMAD_JOB_NAME}.ducamps.win/web/assets/img/banner-light.png",
"homer.url=https://${NOMAD_JOB_NAME}.ducamps.win",
"traefik.enable=true",
"traefik.http.routers.${NOMAD_JOB_NAME}.rule=Host(`${NOMAD_JOB_NAME}.ducamps.win`)",
"traefik.http.routers.${NOMAD_JOB_NAME}.tls.domains[0].sans=${NOMAD_JOB_NAME}.ducamps.win",
"traefik.http.routers.${NOMAD_JOB_NAME}.tls.certresolver=myresolver",
2022-08-07 08:59:39 +00:00
]
}
config {
image = "jellyfin/jellyfin"
ports = ["http"]
volumes = [
"/mnt/diskstation/nomad/jellyfin/config:/config",
"/mnt/diskstation/media/:/media"
]
}
resources {
memory = 900
cpu= 3000
}
}
}
}