mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-12-04 22:14:58 +01:00
4a29b6d8d3
Signed-off-by: magic_rb <magic_rb@redalder.org>
114 lines
2.1 KiB
HCL
114 lines
2.1 KiB
HCL
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
|
|
source = "jellyfin-media"
|
|
}
|
|
|
|
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 {
|
|
image = "jellyfin/jellyfin@sha256:095e6d410d1d27b17cc4a961a9bab9fab5ffce6e49389d8ec685f65ab5538525"
|
|
|
|
# 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 = 1536
|
|
memory_max = 3072
|
|
}
|
|
|
|
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 = true
|
|
}
|
|
}
|
|
}
|
|
}
|