2022-08-07 08:59:39 +00:00
|
|
|
|
|
|
|
job "jellyfin" {
|
|
|
|
datacenters = ["homelab"]
|
2022-12-10 16:10:32 +00:00
|
|
|
priority = 80
|
2022-10-29 08:40:01 +00:00
|
|
|
type = "service"
|
2022-08-07 08:59:39 +00:00
|
|
|
meta {
|
|
|
|
forcedeploy = "0"
|
|
|
|
}
|
|
|
|
constraint {
|
|
|
|
attribute = "${attr.cpu.arch}"
|
2022-10-29 08:40:01 +00:00
|
|
|
value = "amd64"
|
2022-08-07 08:59:39 +00:00
|
|
|
}
|
|
|
|
|
2022-10-29 08:40:01 +00:00
|
|
|
group "jellyfin" {
|
2022-08-07 08:59:39 +00:00
|
|
|
network {
|
|
|
|
mode = "host"
|
|
|
|
port "http" {
|
2022-10-29 08:40:01 +00:00
|
|
|
to = 8096
|
2022-08-07 08:59:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
task "jellyfin" {
|
|
|
|
driver = "docker"
|
|
|
|
service {
|
|
|
|
name = "jellyfin"
|
|
|
|
port = "http"
|
2022-10-29 08:40:01 +00:00
|
|
|
tags = [
|
2022-08-10 17:31:23 +00:00
|
|
|
"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",
|
2022-08-10 17:32:01 +00:00
|
|
|
"/mnt/diskstation/nomad/jellyfin/cache:/cache",
|
|
|
|
"/mnt/diskstation/media/:/media",
|
|
|
|
"/mnt/diskstation/music/:/media2"
|
|
|
|
]
|
|
|
|
devices = [
|
|
|
|
{
|
2022-10-29 08:40:01 +00:00
|
|
|
host_path = "/dev/dri/renderD128"
|
|
|
|
container_path = "/dev/dri/renderD128"
|
2022-08-10 17:32:01 +00:00
|
|
|
},
|
|
|
|
{
|
2022-10-29 08:40:01 +00:00
|
|
|
host_path = "/dev/dri/card0"
|
|
|
|
container_path = "/dev/dri/card0"
|
2022-08-10 17:32:01 +00:00
|
|
|
}
|
2022-08-07 08:59:39 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
}
|
|
|
|
resources {
|
2022-09-09 16:57:14 +00:00
|
|
|
memory = 2000
|
2022-10-29 08:40:01 +00:00
|
|
|
cpu = 3000
|
2022-08-07 08:59:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|