Skip to content

Commit

Permalink
A separate folder for jellyfin transcodes
Browse files Browse the repository at this point in the history
  • Loading branch information
nikarh committed Oct 9, 2024
1 parent 47b025c commit 34e5e1a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ x-service-defaults: &service-defaults
healthcheck:
disable: true
volumes:
jellyfin-transcodes:
driver: local
driver_opts:
type: none
device: /var/cache/jellyfin/transcodes
o: bind
jellyfin-config:
kavita-data:
qbittorrent-data:
Expand Down Expand Up @@ -45,6 +51,7 @@ services:
JELLYFIN_PublishedServerUrl: https://media.${DOMAIN}
volumes:
- jellyfin-config:/config
- jellyfin-transcodes:/config/cache/transcodes
- /var/data/shares/tmp:/media:ro
- /var/data/shares/nikarh/Music:/music
- /var/data/shares/nikarh/Videos:/nikarh/videos
Expand Down
7 changes: 7 additions & 0 deletions system/modules/server/files/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ sudo cp -ufrT "$ROOT/root/var/" /var
# TODO: Move to init container?
sudo chmod 600 /var/lib/docker-services/volumes/sftpd/secrets/ssh*

# Create jellyfin transcode cache subvolume limited to 20gb
sudo mkdir -p /var/cache/jellyfin
sudo btrfs subvolume create /var/cache/jellyfin/transcodes 2> /dev/null || true
sudo btrfs quota enable /var/cache/jellyfin/transcodes
sudo btrfs qgroup limit 20G /var/cache/jellyfin/transcodes
sudo chown files:files /var/cache/jellyfin/transcodes

# Append bind mounts
sudo mkdir -p /var/smalldata
sudo mkdir -p /var/data/{shares,home}
Expand Down

0 comments on commit 34e5e1a

Please sign in to comment.