2023-06-15 23:06:35 +02:00
|
|
|
job "jellyfin" {
|
|
|
|
datacenters = [ "homelab-1" ]
|
|
|
|
type = "service"
|
|
|
|
|
|
|
|
constraint {
|
|
|
|
attribute = "${attr.unique.hostname}"
|
|
|
|
value = "blowhole"
|
|
|
|
}
|
|
|
|
|
|
|
|
group "jellyfin" {
|
|
|
|
count = 1
|
|
|
|
|
|
|
|
volume "jellyfin-cache" {
|
|
|
|
type = "csi"
|
|
|
|
source = "jellyfin-cache"
|
|
|
|
read_only = false
|
|
|
|
|
|
|
|
attachment_mode = "file-system"
|
|
|
|
access_mode = "single-node-writer"
|
|
|
|
}
|
|
|
|
|
|
|
|
volume "jellyfin-config" {
|
|
|
|
type = "csi"
|
|
|
|
source = "jellyfin-config"
|
|
|
|
read_only = false
|
|
|
|
|
|
|
|
attachment_mode = "file-system"
|
|
|
|
access_mode = "single-node-writer"
|
|
|
|
}
|
|
|
|
|
|
|
|
volume "jellyfin-media" {
|
|
|
|
type = "host"
|
|
|
|
read_only = true
|
2023-06-28 14:24:21 +02:00
|
|
|
source = "jellyfin-media"
|
2023-06-15 23:06:35 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
network {
|
|
|
|
mode = "bridge"
|
|
|
|
|
|
|
|
port "http" {
|
|
|
|
to = 8096
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
service {
|
|
|
|
name = "jellyfin"
|
|
|
|
port = "8096"
|
|
|
|
|
|
|
|
check {
|
|
|
|
type = "http"
|
|
|
|
address_mode = "alloc"
|
|
|
|
path = "/"
|
|
|
|
port = "8096"
|
|
|
|
interval = "10s"
|
|
|
|
timeout = "10s"
|
|
|
|
}
|
|
|
|
|
|
|
|
connect {
|
|
|
|
sidecar_service {}
|
|
|
|
|
|
|
|
sidecar_task {
|
|
|
|
resources {
|
|
|
|
cpu = 75
|
|
|
|
memory = 48
|
|
|
|
memory_max = 96
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
task "jellyfin" {
|
|
|
|
driver = "docker"
|
|
|
|
|
|
|
|
config {
|
2023-06-28 14:24:21 +02:00
|
|
|
image = "jellyfin/jellyfin@sha256:08900f012d66d2cfed7cfa2343ea5a05ba8e8c487ef565738e96eb4acb3082ac"
|
2023-06-15 23:06:35 +02:00
|
|
|
|
|
|
|
# devices = [
|
|
|
|
# {
|
|
|
|
# host_path = "/dev/dri/renderD128"
|
|
|
|
# container_path = "/dev/dri/renderD128"
|
|
|
|
# },
|
|
|
|
# {
|
|
|
|
# host_path = "/dev/dri/card0"
|
|
|
|
# container_path = "/dev/dri/card0"
|
|
|
|
# }
|
|
|
|
# ]
|
|
|
|
}
|
|
|
|
|
|
|
|
resources {
|
|
|
|
cpu = 1024
|
|
|
|
memory = 1024
|
|
|
|
memory_max = 2048
|
|
|
|
}
|
|
|
|
|
|
|
|
volume_mount {
|
|
|
|
volume = "jellyfin-cache"
|
|
|
|
destination = "/cache"
|
|
|
|
read_only = false
|
|
|
|
}
|
|
|
|
|
|
|
|
volume_mount {
|
|
|
|
volume = "jellyfin-config"
|
|
|
|
destination = "/config"
|
|
|
|
read_only = false
|
|
|
|
}
|
|
|
|
|
|
|
|
volume_mount {
|
|
|
|
volume = "jellyfin-media"
|
|
|
|
destination = "/media"
|
2023-06-28 14:24:21 +02:00
|
|
|
read_only = true
|
2023-06-15 23:06:35 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|