yt-dlp-dags/docker-compose-ytdlp-ops.yaml

74 lines
2.4 KiB
YAML

services:
camoufox:
build:
context: ./camoufox # Path relative to the docker-compose file
dockerfile: Dockerfile
args:
VNC_PASSWORD: ${VNC_PASSWORD:-supersecret} # Use environment variable or default
ports:
# Optionally expose the camoufox port to the host for debugging
- "12345:12345"
- "5900:5900" # Expose VNC port to the host
networks:
- airflow_prod_proxynet
command: [
"--ws-host", "0.0.0.0",
"--port", "12345",
"--ws-path", "mypath",
"--proxy-url", "socks5://sslocal-rust-1084:1084",
"--locale", "en-US",
"--geoip",
"--extensions", "/app/extensions/google_sign_in_popup_blocker-1.0.2.xpi,/app/extensions/spoof_timezone-0.3.4.xpi,/app/extensions/youtube_ad_auto_skipper-0.6.0.xpi"
]
restart: unless-stopped
# Add healthcheck if desired
ytdlp-ops:
image: pangramia/ytdlp-ops-server:latest # Don't comment out or remove, build is performed externally
depends_on:
- camoufox # Ensure camoufox starts first
ports:
- "9090:9090" # Main RPC port
- "9091:9091" # Health check port
volumes:
- context-data:/app/context-data
networks:
- airflow_prod_proxynet
command:
- "--context-dir"
- "/app/context-data"
- "--port"
- "9090"
- "--clients"
# Add 'web' client since we now have camoufox, test firstly
- "web,ios,android,mweb"
- "--proxies"
- "socks5://sslocal-rust-1081:1081,socks5://sslocal-rust-1082:1082,socks5://sslocal-rust-1083:1083,socks5://sslocal-rust-1084:1084,socks5://sslocal-rust-1085:1085"
# Add the endpoint argument pointing to the camoufox service
- "--endpoint"
- "ws://camoufox:12345/mypath"
- "--probe"
# Add --camouflage-only if you don't want ytdlp-ops to manage the browser directly
- "--camouflage-only"
# Add flag to print full tokens in logs by default
- "--print-tokens"
# Add server identity and Redis connection details
- "--server-identity"
- "ytdlp-ops-airflow-service"
- "--redis-host"
- "${REDIS_HOST:-redis}"
- "--redis-port"
- "${REDIS_PORT:-6379}"
- "--redis-password"
- "${REDIS_PASSWORD}"
restart: unless-stopped
pull_policy: always
volumes:
context-data:
name: context-data
networks:
airflow_prod_proxynet:
external: true