The merged door was /mnt/media, which read like a third volume and split the host state across two trees. It is now /var/lib/media-meta/view, so the array layer, the SSD upper layer, the kernel workdir, the reap trash and the merged tree are one directory — and the mount table gains no new /mnt entry beside the array. systemd names a mount unit after its ESCAPED path, so the repo copy keeps the readable name media-meta-view.mount while `install` writes the host file as var-lib-media\x2dmeta-view.mount; `plan` prints both and the page records them, so nobody hunts for a unit that "does not exist". install also creates the mount point itself, because systemd will not. The seam now additionally pins that the unit's Where= is exactly the path both containers bind — guard and bind cannot drift apart. The Quadlet Lifecycle phantom-path example is corrected too: it named an invented /mnt/media/*, while the real phantom is the legacy /opt/jellyfin/* that dankserver/compose.yaml still carries for a service whose roots moved to /home/dank/Containers/jellyfin.
64 lines
2.5 KiB
INI
64 lines
2.5 KiB
INI
# Quadlet unit: Jellyfin media server (rootless, boot-persistent).
|
|
#
|
|
# Install path on dankserver: ~/.config/containers/systemd/jellyfin.container
|
|
# Unit name: jellyfin.service (podman 5.x drops the container- prefix)
|
|
#
|
|
# Data roots migrated from /opt/jellyfin to /home/dank/Containers/jellyfin at
|
|
# cutover. The library is seen through /var/lib/media-meta/view, the SSD-backed
|
|
# overlay view (scripts/media-view.sh): the array stays read-only and untouched,
|
|
# while the sidecars this server writes land on the NVMe. Every
|
|
# creation-time environment variable of the compose-era container is kept as
|
|
# an Environment= line (zero drift); none of them are secrets, so this unit
|
|
# needs no EnvironmentFile.
|
|
|
|
[Unit]
|
|
Description=Jellyfin media server container
|
|
After=network.target
|
|
|
|
[Container]
|
|
ContainerName=jellyfin
|
|
Image=ghcr.io/jellyfin/jellyfin:latest@sha256:fea863d0cd9ec445985d9c75fc6ed64e38a1d2766cf0c250a33d553f4fc1b771
|
|
Network=dankserver_appnet
|
|
Environment=DEBIAN_FRONTEND=noninteractive
|
|
Environment=DOTNET_SYSTEM_IO_DISABLEFILELOCKING=true
|
|
Environment=JELLYFIN_CACHE_DIR=/cache
|
|
Environment=JELLYFIN_CONFIG_DIR=/config/config
|
|
Environment=JELLYFIN_DATA_DIR=/config
|
|
Environment=JELLYFIN_FFMPEG=/usr/lib/jellyfin-ffmpeg/ffmpeg
|
|
Environment=JELLYFIN_LOG_DIR=/config/log
|
|
Environment=JELLYFIN_PublishedServerUrl=http://192.168.0.235:8096
|
|
Environment=JELLYFIN_WEB_DIR=/jellyfin/jellyfin-web
|
|
Environment=LANG=en_US.UTF-8
|
|
Environment=LANGUAGE=en_US:en
|
|
Environment=LC_ALL=en_US.UTF-8
|
|
Environment=LD_PRELOAD=/usr/lib/jellyfin/libjemalloc.so.2
|
|
Environment=MALLOC_TRIM_THRESHOLD_=131072
|
|
Environment=NVIDIA_DRIVER_CAPABILITIES=compute,video,utility
|
|
Environment=NVIDIA_VISIBLE_DEVICES=all
|
|
Environment=XDG_CACHE_HOME=/cache
|
|
PublishPort=8096:8096
|
|
PublishPort=8920:8920
|
|
PublishPort=7359:7359/udp
|
|
PublishPort=1900:1900/udp
|
|
Volume=/home/dank/Containers/jellyfin/config:/config
|
|
Volume=/home/dank/Containers/jellyfin/cache:/cache
|
|
# The view, writable: Jellyfin is the metadata writer (movie.nfo / tvshow.nfo /
|
|
# episode.nfo + artwork) and those bytes belong on the SSD. The condition is the
|
|
# fail-closed guard — starting against a plain, unmounted view directory would let
|
|
# a scan conclude the library is empty.
|
|
Volume=/var/lib/media-meta/view:/data
|
|
UnitConfigItem=ConditionPathIsMountPoint=/var/lib/media-meta/view
|
|
AddDevice=/dev/dri
|
|
GroupAdd=keep-groups
|
|
HealthCmd=curl -f http://localhost:8096/health
|
|
HealthInterval=30s
|
|
HealthTimeout=10s
|
|
HealthRetries=3
|
|
|
|
[Service]
|
|
Restart=always
|
|
RestartSec=5
|
|
|
|
[Install]
|
|
WantedBy=default.target
|