services: tubescript-api: build: context: . dockerfile: Dockerfile.api args: # Invalida la capa COPY . /app sin necesidad de --no-cache completo CACHEBUST: "${CACHEBUST:-1}" image: tubescript-api:latest container_name: tubescript_api ports: - "8282:8000" volumes: # Datos persistentes: cookies.txt, config, etc. - ./data:/app/data:rw # ── Perfiles de navegador del HOST (read-only) ────────────────────────── # yt-dlp puede leer cookies directamente del navegador con # POST /extract_chrome_cookies?browser=chrome # Descomenta el navegador que tengas instalado en el host: - ${HOME}/.config/google-chrome:/host-chrome:ro # - ${HOME}/.config/chromium:/host-chromium:ro # - ${HOME}/.config/BraveSoftware/Brave-Browser:/host-brave:ro # - ${HOME}/.mozilla/firefox:/host-firefox:ro # - ${HOME}/.config/microsoft-edge:/host-edge:ro environment: - PYTHONUNBUFFERED=1 - API_COOKIES_PATH=/app/data/cookies.txt # Proxy opcional: socks5h://127.0.0.1:9050 - API_PROXY=${API_PROXY:-} restart: unless-stopped networks: - tubescript-network healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8000/docs"] interval: 30s timeout: 10s retries: 3 start_period: 40s networks: tubescript-network: name: tubescript-network driver: bridge