--- services: jellyfin: image: "jellyfin/jellyfin:{{ jellyfin_container_version }}" container_name: "{{ jellyfin_container_name }}" user: {{ jellyfin_uid }}:{{ jellyfin_gid }} restart: {{ jellyfin_restart_policy }} ports: - {{ jellyfin_http_port }}:8096/tcp - {{ jellyfin_discovery_port }}:7359/udp volumes: - "{{ jellyfin_config_path }}:/config" - "{{ jellyfin_cache_path }}:/cache" {% for item in jellyfin_libraries %} - "{{ item.host_path }}:{{ item.container_path }}:ro" {% endfor %} {% if jellyfin_server_url %} # Optional - alternative address used for autodiscovery environment: - JELLYFIN_PublishedServerUrl={{ jellyfin_server_url }} {% endif %} {% if jellyfin_gpu_passthrough %} deploy: resources: reservations: devices: - driver: nvidia count: 1 capabilities: [gpu] {% endif %}