services:
  jellyfin:
    image: jellyfin/jellyfin:latest
    container_name: jellyfin
    restart: unless-stopped
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Chicago
      - NVIDIA_DRIVER_CAPABILITIES=all
      - NVIDIA_VISIBLE_DEVICES=all
    ports:
      - "8096:8096"      # Web UI
      - "7359:7359/udp"  # Client discovery
    volumes:
      - ./config:/config
      - /mnt/NV2/jellyfin-cache:/cache
      - /mnt/truenas/media:/media:ro
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu]
