Files
NomadBackup/nomad_backup/jellyfin.hcl
2026-04-20 02:04:57 +00:00

112 lines
2.3 KiB
HCL

# There can only be a single job definition per file.
# Create a job with ID and Name 'example'
job "jellyfin" {
datacenters = ["dc1"]
type = "service"
constraint {
attribute = "${attr.kernel.name}"
value = "linux"
}
constraint {
attribute = "${attr.unique.hostname}"
value = "opti1"
}
update {
stagger = "10s"
max_parallel = 1
}
group "jellyfin" {
count = 1
restart {
attempts = 5
interval = "1m"
delay = "10s"
mode = "delay"
}
task "jellyfin" {
driver = "docker"
config {
image = "linuxserver/jellyfin"
ports = ["jellyfin8096"]
// network_mode = "host"
volumes = [
"/mnt/Public/Downloads/tv/:/data/tv",
"/mnt/Public/Downloads/movies/:/data/movies",
"/mnt/configs/jellyfin:/config",
]
}
service {
name = "${TASKGROUP}"
tags = ["jellyfin", "tools"]
port = "jellyfin8096"
// check {
// type = "http"
// // port = "jellyfin7878"
// path = "/api/v3/system/status?apikey=237c27f22504440385e5ee295fd65eb5"
// interval = "60s"
// timeout = "5s"
// // header {
// // Authorization = ["Basic ZWxhc3RpYzpjaGFuZ2VtZQ=="]
// // }
// }
}
env {
TZ = "EST5EDT"
PUID = 1000
PGID = 1000
JELLYFIN_PublishedServerUrl = "http://jellyfin.service.dc1.consul:8096/"
}
resources {
cpu = 500 # 500 MHz
memory = 1024 # 128MB
// network {
// port "jellyfin" {
// static = "7878"
// }
// }
}
logs {
max_files = 10
max_file_size = 15
}
kill_timeout = "10s"
} #Task
network {
// mode = "bridge"
port "jellyfin8096" {
static = 8096
to = 8096
}
// port "jellyfin8920" {
// static = 8920
// to = 8920
// }
// port "jellyfin7359" {
// static = 7359
// to = 7359
// }
// port "jellyfin1900" {
// static = 1900
// to = 1900
// }
}
} #Group
}