-
-
Notifications
You must be signed in to change notification settings - Fork 9
Volumes
When creating symlinks for media directories, it is essential to use absolute paths within your Docker containers to ensure proper functionality.
Below is an example configuration for a Jellyfin container:
services:
jellyfin:
image: jellyfin/jellyfin
container_name: jellyfin
network_mode: 'host'
volumes:
- .config:/config
- .cache:/cache
- type: bind
source: /mnt
target: /media1
- type: bind
source: /home/zurg
target: /zurg
- type: bind
source: /mnt/CineSync
target: /media
restart: 'unless-stopped'
environment:
- JELLYFIN_PublishedServerUrl=http://localhost:8096
- PUID=0
- PGID=0
If your zurg
or actual debrid mount is located at /home/zurg
, and your CineSync symlinks are located under /mnt/CineSync
, the volumes will be mapped as follows:
-
/home/zurg
maps to/zurg
-
/mnt/CineSync
maps to/media
In your local setup:
/home/zurg/Movies/Eternal Sunshine of the Spotless Mind
-
/mnt/CineSync/Movies/Eternal Sunshine of the Spotless Mind
(Symlinked file pointing to/home/zurg/Movies/Eternal Sunshine of the Spotless Mind
)
Inside the Jellyfin container:
-
/home/zurg/Movies/Eternal Sunshine of the Spotless Mind
becomes/zurg/Movies/Eternal Sunshine of the Spotless Mind
-
/mnt/CineSync/Movies/Eternal Sunshine of the Spotless Mind
becomes/media/CineSync/Movies/Eternal Sunshine of the Spotless Mind
Symlinks require absolute paths. This can cause mismatches and media inaccessibility if paths inside the container do not align with the symlinks' original absolute paths. For example:
-
/home/zurg/Movies/Eternal Sunshine of the Spotless Mind
→/zurg/Movies/Eternal Sunshine of the Spotless Mind
-
/mnt/CineSync/Movies/Eternal Sunshine of the Spotless Mind
→/media/CineSync/Movies/Eternal Sunshine of the Spotless Mind
The path /media
will no longer points to /mnt
since we did not map that inside the container. This mismatch can lead to media breakage.
To avoid these issues, mount the full directories instead of specific folders. Update your volumes
section as follows:
volumes:
- type: bind
source: /mnt
target: /mnt
- type: bind
source: /home
target: /home
By mounting the entire /mnt
and /home
directories, all symlinks and paths will remain consistent and accessible inside the container.