Files
canopy-workloads/jellyfin/docker-compose.yml
T

41 lines
1.6 KiB
YAML

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