services: iptv-player: image: lanedfritz/iptv-player:latest container_name: iptv-player # Uncomment if you have NVIDIA Container Toolkit installed on the host # AND want GPU-accelerated transcoding. Also enable "Use GPU" in app Settings. runtime: nvidia ports: - "5000:5000" volumes: # Database and app data — persisted across updates - /var/lib/docker/volumes/iptv-player/data/path:/app/data # Recordings storage - /var/lib/docker/volumes/iptv-player/recordings:/data/recordings # HLS stream buffer (live TV) - /var/lib/docker/volumes/iptv-player/streams:/data/streams # Docker socket — required for container restart from the UI - /var/run/docker.sock:/var/run/docker.sock environment: # Database — SQLite by default (file lives in /app/data) - ConnectionStrings__DefaultConnection=Data Source=/app/data/iptv.db # Directories (must match volume mounts above) - StreamSettings__StreamsDirectory=/data/streams - DVRSettings__RecordingsDirectory=/data/recordings # Timezone — adjust to your local timezone - TZ=Europe/Paris - ASPNETCORE_ENVIRONMENT=Production # Optional: uncomment to use PostgreSQL instead of SQLite # (also uncomment the postgres service and depends_on below) - PostgresConnection=Host=postgres;Database=iptv;Username=iptv;Password=CHANGE_ME # Uncomment if using PostgreSQL depends_on: postgres: condition: service_healthy restart: unless-stopped networks: - iptv-network # Optional: PostgreSQL # Remove the '#' from every line in this block to enable it. # Also uncomment PostgresConnection and depends_on above. # postgres: image: postgres:16-alpine container_name: iptv-postgres environment: - POSTGRES_DB=iptv - POSTGRES_USER=iptv - POSTGRES_PASSWORD=CHANGE_ME # must match PostgresConnection above volumes: - /var/lib/docker/volumes/iptv-player/postgres/data:/var/lib/postgresql/data restart: unless-stopped networks: - iptv-network healthcheck: test: ["CMD-SHELL", "pg_isready -U iptv -d iptv"] interval: 10s timeout: 5s retries: 5 networks: iptv-network: driver: bridge volumes: {}