2021-08-13 16:43:43 +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 = "csi"
|
|
|
|
source = "jellyfin-media"
|
|
|
|
read_only = false
|
|
|
|
|
|
|
|
attachment_mode = "file-system"
|
|
|
|
access_mode = "single-node-writer"
|
|
|
|
}
|
|
|
|
|
|
|
|
volume "jellyfin-mount" {
|
|
|
|
type = "host"
|
|
|
|
read_only = true
|
|
|
|
source = "jellyfin-mount"
|
|
|
|
}
|
|
|
|
|
|
|
|
network {
|
|
|
|
mode = "bridge"
|
|
|
|
|
|
|
|
port "http" {
|
|
|
|
to = 8096
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
service {
|
|
|
|
name = "jellyfin"
|
2022-03-23 10:37:22 +01:00
|
|
|
port = "8096"
|
2021-08-13 16:43:43 +02:00
|
|
|
|
|
|
|
check {
|
|
|
|
type = "http"
|
|
|
|
address_mode = "alloc"
|
|
|
|
path = "/"
|
|
|
|
port = "8096"
|
|
|
|
interval = "10s"
|
|
|
|
timeout = "10s"
|
|
|
|
}
|
|
|
|
|
|
|
|
connect {
|
|
|
|
sidecar_service {}
|
|
|
|
|
|
|
|
sidecar_task {
|
|
|
|
resources {
|
|
|
|
cpu = 75
|
|
|
|
memory = 48
|
|
|
|
}
|
|
|
|
|
|
|
|
config {
|
|
|
|
memory_hard_limit = 96
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
task "jellyfin" {
|
|
|
|
driver = "docker"
|
|
|
|
|
|
|
|
config {
|
2022-06-01 08:41:51 +02:00
|
|
|
image = "jellyfin/jellyfin@sha256:b4500b143d8a0d4383c50721517908d679af1c5ec00e791f0097f8c419b3e853"
|
2021-08-13 16:43:43 +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
|
|
|
|
}
|
|
|
|
|
|
|
|
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"
|
|
|
|
read_only = false
|
|
|
|
}
|
|
|
|
|
|
|
|
volume_mount {
|
|
|
|
volume = "jellyfin-mount"
|
|
|
|
destination = "/mount"
|
|
|
|
read_only = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|