80 lines
2.5 KiB
YAML
80 lines
2.5 KiB
YAML
services:
|
|
jellyfin:
|
|
image: jellyfin/jellyfin:latest
|
|
container_name: jellyfin
|
|
# Optional: run as a specific user/group instead of root
|
|
# Replace 1000:1000 with your actual UID:GID (run `id` in terminal to find yours)
|
|
# user: "1000:1000"
|
|
|
|
ports:
|
|
- 8096:8096/tcp # Main HTTP web UI & API
|
|
- 8920:8920/tcp # HTTPS web UI (optional, requires cert setup)
|
|
- 7359:7359/udp # Local network auto-discovery (DLNA)
|
|
- 1900:1900/udp # DLNA service discovery (optional, requires host network)
|
|
|
|
volumes:
|
|
# Jellyfin configuration & metadata database
|
|
- ./jellyfin/config:/config
|
|
|
|
# Transcoding cache (can be tmpfs for better performance)
|
|
- ./jellyfin/cache:/cache
|
|
|
|
# --- Media Libraries ---
|
|
# Add as many bind mounts as you need for your media folders.
|
|
# Set read_only: true for libraries Jellyfin should not modify.
|
|
- type: bind
|
|
source: ./media/movies
|
|
target: /media/movies
|
|
read_only: true
|
|
|
|
- type: bind
|
|
source: ./media/tvshows
|
|
target: /media/tvshows
|
|
read_only: true
|
|
|
|
- type: bind
|
|
source: ./media/music
|
|
target: /media/music
|
|
read_only: true
|
|
|
|
# Optional: custom fonts for subtitle burn-in during transcoding
|
|
# - type: bind
|
|
# source: ./fonts
|
|
# target: /usr/local/share/fonts/custom
|
|
# read_only: true
|
|
|
|
# Optional: fallback fonts directory
|
|
# (set fallback font path to /fallback_fonts in Jellyfin server settings)
|
|
# - type: bind
|
|
# source: ./fallback_fonts
|
|
# target: /fallback_fonts
|
|
# read_only: true
|
|
|
|
environment:
|
|
# Optional: set this to your server's public URL for correct autodiscovery
|
|
- JELLYFIN_PublishedServerUrl=http://tube.martinhal.tech:8096
|
|
|
|
# Timezone (change to your local timezone)
|
|
- TZ=Europe/Lisbon
|
|
|
|
# Optional: enable GPU hardware acceleration (Intel/AMD iGPU via /dev/dri)
|
|
# Uncomment the section below if your host has a compatible GPU
|
|
# devices:
|
|
# - /dev/dri:/dev/dri
|
|
|
|
# Required if using host network mode for full DLNA support
|
|
# network_mode: host
|
|
|
|
# Needed for Docker healthcheck to pass in host network mode
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
|
|
restart: unless-stopped
|
|
|
|
# Optional: resource limits to prevent Jellyfin from consuming all system resources
|
|
# deploy:
|
|
# resources:
|
|
# limits:
|
|
# memory: 4G
|
|
# cpus: "4.0"
|