Files
canopy-workloads/jellyfin/docker-compose.yml
kiskaadee 4117d47ddf fix(jellyfin): point mounts to var/lib/homelab and align PUID/PGID
- Update jellyfin/docker-compose.yml bind mounts from ./{config,cache,media} to ../../var/lib/homelab/jellyfin/{config,cache,media} so SQLite data persists on host-owned state and passes validate_compose_security.
- Align PUID/PGID defaults to 1001:988 (operator:homelab-operators) in jellyfin/docker-compose.yml and jellyfin/.env-example to prevent SQLite readonly database exit 139.
- Align CERT_RESOLVER default in jellyfin/.env-example to myresolver and update jellyfin/README.md volume paths.
2026-11-19 17:54:48 -05:00

41 lines
1.8 KiB
YAML

services:
jellyfin:
image: jellyfin/jellyfin:${IMAGE_TAG:-latest}
container_name: ${CONTAINER_NAME:-jellyfin}
user: "${PUID:-1001}:${PGID:-988}"
environment:
- TZ=${TZ:-UTC}
volumes:
- ../../var/lib/homelab/jellyfin/config:/config
- ../../var/lib/homelab/jellyfin/cache:/cache
- ../../var/lib/homelab/jellyfin/media:/media:ro
restart: unless-stopped
networks:
- proxy-net
labels:
- "traefik.enable=true"
# HTTPS Router
- "traefik.http.routers.${CONTAINER_NAME:-jellyfin}.rule=Host(`${SERVICE_DOMAIN}`)"
- "traefik.http.routers.${CONTAINER_NAME:-jellyfin}.entrypoints=${HTTPS_ENTRYPOINT:-websecure}"
- "traefik.http.routers.${CONTAINER_NAME:-jellyfin}.tls=true"
- "traefik.http.routers.${CONTAINER_NAME:-jellyfin}.tls.certresolver=${CERT_RESOLVER:-myresolver}"
- "traefik.http.routers.${CONTAINER_NAME:-jellyfin}.middlewares=${CONTAINER_NAME:-jellyfin}-ratelimit@docker"
- "traefik.http.routers.${CONTAINER_NAME:-jellyfin}.service=${CONTAINER_NAME:-jellyfin}-svc"
# Rate Limit Middleware
- "traefik.http.middlewares.${CONTAINER_NAME:-jellyfin}-ratelimit.ratelimit.average=${RATE_LIMIT_AVG:-100}"
- "traefik.http.middlewares.${CONTAINER_NAME:-jellyfin}-ratelimit.ratelimit.burst=${RATE_LIMIT_BURST:-50}"
# HTTP to HTTPS Redirect
- "traefik.http.routers.${CONTAINER_NAME:-jellyfin}-red.rule=Host(`${SERVICE_DOMAIN}`)"
- "traefik.http.routers.${CONTAINER_NAME:-jellyfin}-red.entrypoints=${HTTP_ENTRYPOINT:-web}"
- "traefik.http.routers.${CONTAINER_NAME:-jellyfin}-red.middlewares=${HTTPS_REDIRECT_MIDDLEWARE:-https-redirect@docker}"
# Service definition
- "traefik.http.services.${CONTAINER_NAME:-jellyfin}-svc.loadbalancer.server.port=8096"
networks:
proxy-net:
name: ${PROXY_NETWORK:-proxy-net}
external: true