FROM python:3.12-slim ENV PYTHONDONTWRITEBYTECODE=1 ENV PYTHONUNBUFFERED=1 # Use Debian's Chromium instead of downloading another browser through Puppeteer. ENV PUPPETEER_SKIP_DOWNLOAD=true ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium WORKDIR /app # Node.js + Chromium for Player 2 V7 extraction. RUN apt-get update \ && apt-get install -y --no-install-recommends \ chromium \ nodejs \ npm \ ca-certificates \ fonts-liberation \ && rm -rf /var/lib/apt/lists/* # Python relay/player dependencies. COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Node/Puppeteer dependencies. COPY package.json . RUN npm install --omit=dev --no-audit --no-fund # Application files. COPY app.py . COPY extract-streams-v7-media.mjs . CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]