version: '3.8' services: metube: build: . image: metube:latest container_name: metube restart: unless-stopped ports: - "8081:8081" volumes: - ./downloads:/downloads - ./metube-config:/config # Optional: mount cookies file for authenticated downloads # - ./cookies:/cookies:ro environment: # Basic configuration - UID=0 - GID=0 - UMASK=022 # Download directories - DOWNLOAD_DIR=/downloads - STATE_DIR=/config - TEMP_DIR=/downloads # Download behavior - DOWNLOAD_MODE=limited - MAX_CONCURRENT_DOWNLOADS=3 - DELETE_FILE_ON_TRASHCAN=true # Custom directories - CUSTOM_DIRS=true - CREATE_CUSTOM_DIRS=true - CUSTOM_DIRS_EXCLUDE_REGEX=(^|/)[.@].*$ - DOWNLOAD_DIRS_INDEXABLE=false # File naming - OUTPUT_TEMPLATE=%(title)s.%(ext)s - OUTPUT_TEMPLATE_CHAPTER=%(title)s - %(section_number)s %(section_title)s.%(ext)s - OUTPUT_TEMPLATE_PLAYLIST=%(playlist_title)s/%(title)s.%(ext)s # Playlist options - DEFAULT_OPTION_PLAYLIST_STRICT_MODE=false - DEFAULT_OPTION_PLAYLIST_ITEM_LIMIT=0 # Web server - URL_PREFIX= - PUBLIC_HOST_URL=download/ - PUBLIC_HOST_AUDIO_URL=audio_download/ - HOST=0.0.0.0 - PORT=8081 # Logging - LOGLEVEL=INFO - ENABLE_ACCESSLOG=false # Theme - DEFAULT_THEME=auto # Optional: yt-dlp options # - YTDL_OPTIONS={} # - YTDL_OPTIONS_FILE=/path/to/ytdl_options.json # Optional: cookies for authenticated downloads # - YTDL_OPTIONS={"cookiefile":"/cookies/cookies.txt"} # Optional: HTTPS configuration # - HTTPS=true # - CERTFILE=/ssl/cert.pem # - KEYFILE=/ssl/key.pem # Optional: robots.txt # - ROBOTS_TXT=/app/robots.txt # Optional: health check healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8081/version"] interval: 30s timeout: 10s retries: 3 start_period: 40s playlist-monitor: build: ./playlist-monitor image: playlist-monitor:latest container_name: playlist-monitor restart: unless-stopped ports: - "8082:8082" volumes: - ./playlist-monitor/data:/app/data - ./playlist-monitor/logs:/app/logs - ./downloads:/downloads:ro # Read-only access to downloads for file tracking environment: - METUBE_URL=http://metube:8081 - DATABASE_URL=sqlite:///data/playlists.db - LOG_LEVEL=INFO - DEFAULT_CHECK_INTERVAL=60 - MAX_CONCURRENT_DOWNLOADS=3 depends_on: - metube networks: - metube-network # Optional: health check healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8082/api/health"] interval: 30s timeout: 10s retries: 3 start_period: 40s # Network configuration networks: metube-network: driver: bridge name: metube-network # Optional: named volumes volumes: metube-downloads: driver: local playlist-monitor-data: driver: local