media-rip/docker-compose.example.yml
xpltd 61ee8d4eff Clean up docs: fix config defaults, remove redundant vars, add missing ones
README Configuration section:
- Organized into logical groups (Core, Admin, Purge, UI, yt-dlp)
- Fixed wrong defaults: admin.enabled (true not false), purge.enabled
  (true not false), purge field is max_age_minutes not max_age_hours,
  purge.cron is '* * * * *' not '0 3 * * *'
- Removed redundant internal-path vars (DB_PATH, DATA_DIR, OUTPUT_DIR)
  that are pre-set in the Dockerfile and shouldn't be changed
- Added missing vars: LOG_LEVEL, UI settings, PRIVACY_MODE, YTDLP
- Added extractor_args usage examples (YAML and env var)

docker-compose files:
- Switched healthcheck from python urllib to curl (already in image)
- Removed stale PURGE__MAX_AGE_HOURS references
- Added commented yt-dlp extractor_args example
- Simplified comments to reflect actual defaults
2026-03-21 22:28:31 -05:00

59 lines
1.7 KiB
YAML

# media.rip() — Docker Compose with Caddy reverse proxy (recommended for production)
#
# Caddy automatically provisions TLS certificates via Let's Encrypt.
#
# Setup:
# 1. Copy .env.example to .env and fill in your values
# 2. Run: docker compose -f docker-compose.example.yml up -d
#
# Generate a bcrypt password hash:
# docker run --rm python:3.12-slim python -c \
# "import bcrypt; print(bcrypt.hashpw(b'YOUR_PASSWORD', bcrypt.gensalt()).decode())"
services:
media-rip:
image: ghcr.io/xpltdco/media-rip:latest
container_name: media-rip
restart: unless-stopped
volumes:
- downloads:/downloads # Downloaded media files
- data:/data # Database, sessions, error logs
# Optional:
# - ./themes:/themes:ro # Custom theme CSS overrides
# - ./config.yaml:/app/config.yaml:ro # YAML config file
environment:
# Admin panel
MEDIARIP__ADMIN__ENABLED: "true"
MEDIARIP__ADMIN__USERNAME: "${ADMIN_USERNAME:-admin}"
MEDIARIP__ADMIN__PASSWORD_HASH: "${ADMIN_PASSWORD_HASH}"
# Session mode: isolated (default), shared, or open
MEDIARIP__SESSION__MODE: "${SESSION_MODE:-isolated}"
expose:
- "8000"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/api/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
caddy:
image: caddy:2-alpine
container_name: media-rip-caddy
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- caddy_data:/data
- caddy_config:/config
depends_on:
media-rip:
condition: service_healthy
volumes:
downloads:
data:
caddy_data:
caddy_config: