Update file docker-compose.yml.j2

This commit is contained in:
Administrator 2025-10-17 14:36:13 +00:00
parent 29baa9897b
commit 4fc254fe79

View File

@ -1,30 +1,40 @@
version: '3.8'
services:
jellyfin:
image: jellyfin/jellyfin:latest
container_name: jellyfin
restart: unless-stopped
environment:
- TZ=Asia/Yekaterinburg
- JELLYFIN_PublishedServerUrl=http://192.168.1.223:45131
- TZ={{ timezone }}
- JELLYFIN_PublishedServerUrl=http://{{ ansible_host }}:{{ jellyfin_port }}
- JELLYFIN_EnableDLNA=true
- JELLYFIN_EnableUPnP=true
user: "1000:1000"
volumes:
- /mnt/service/jellyfin/config:/config
- /mnt/service/jellyfin/cache:/cache
- /mnt/service/jellyfin/logs:/log
- /mnt/media:/media:ro
- {{ jellyfin_config_dir }}:/config
- {{ jellyfin_cache_dir }}:/cache
- {{ jellyfin_logs_dir }}:/log
- {{ jellyfin_media_path }}:/media:ro
- /dev/dri:/dev/dri
devices:
- /dev/dri/renderD128:/dev/dri/renderD128
- /dev/dri/card0:/dev/dri/card0
- /dev/dri/card1:/dev/dri/card1
ports:
- "45131:8096"
privileged: false
read_only: false
- "{{ jellyfin_port }}:8096"
- "1900:1900/udp"
- "7359:7359/udp"
network_mode: bridge
tmpfs:
- /tmp
ulimits:
nproc: 65535
nofile:
soft: 65535
hard: 65535
security_opt:
- no-new-privileges:true
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8096/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s