/
/
/
Ansible role that provisions my storage server.
1# Jellyfin Media Server Docker Compose Configuration
2# Generated by Ansible - DO NOT EDIT MANUALLY
3
4version: '3.8'
5
6services:
7 jellyfin:
8 image: {{ jellyfin_image }}:{{ jellyfin_version }}
9 container_name: jellyfin
10 restart: unless-stopped
11
12 # Environment Configuration
13 env_file:
14 - .env
15
16 # Port Mapping
17 ports:
18 - "{{ jellyfin_host_port }}:{{ jellyfin_port }}"
19 # Additional ports for DLNA/UPnP if needed
20 - "1900:1900/udp" # DLNA
21 - "7359:7359/udp" # Local network discovery
22
23 # Volume Mounts
24 volumes:
25 - {{ jellyfin_config_dir }}:/config
26 - {{ jellyfin_cache_dir }}:/cache
27 - {{ jellyfin_media_dir }}:/media:ro
28 # Additional media paths can be added here
29 - {{ storage_base_path }}/media/movies:/media/movies:ro
30 - {{ storage_base_path }}/media/tv:/media/tv:ro
31 - {{ storage_base_path }}/media/music:/media/music:ro
32
33 # Resource Limits
34 deploy:
35 resources:
36 limits:
37 memory: {{ jellyfin_memory_limit }}
38 cpus: '{{ jellyfin_cpu_limit }}'
39
40 # Health Check
41 healthcheck:
42 test: ["CMD", "curl", "-f", "http://localhost:{{ jellyfin_port }}/health"]
43 interval: {{ health_check_interval }}
44 timeout: {{ health_check_timeout }}
45 retries: {{ health_check_retries }}
46 start_period: 60s
47
48 # Network
49 networks:
50 - {{ storage_docker_network }}
51
52 # Hardware Access (uncomment for GPU transcoding)
53 # devices:
54 # - /dev/dri:/dev/dri # Intel/AMD GPU
55 # runtime: nvidia # NVIDIA GPU
56
57networks:
58 {{ storage_docker_network }}:
59 external: true