Spaces:
Sleeping
Sleeping
Download Dockerfile from newman21/easy-proxy: direct link, hf CLI and curl.
- Browser
- Download file 2.15 kB
-
https://huggingface.co/spaces/newman21/easy-proxy/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/newman21/easy-proxy/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/newman21/easy-proxy/resolve/main/Dockerfile
2.15 kB
| # Fase 1: Build | |
| # Usa un'immagine Python con base Debian per FFmpeg completo | |
| FROM python:3.11-bookworm | |
| # Runtime flags for browser-assisted extractors in containers. | |
| ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright | |
| ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=0 | |
| ENV PYTHONUNBUFFERED=1 | |
| # Installa git, FFmpeg e le dipendenze necessarie a Chromium/Xvfb. | |
| RUN apt-get update && apt-get install -y \ | |
| git \ | |
| ffmpeg \ | |
| xvfb \ | |
| libnss3 \ | |
| libatk1.0-0 \ | |
| libatk-bridge2.0-0 \ | |
| libcups2 \ | |
| libdrm2 \ | |
| libxkbcommon0 \ | |
| libxcomposite1 \ | |
| libxdamage1 \ | |
| libxfixes3 \ | |
| libxrandr2 \ | |
| libgbm1 \ | |
| libasound2 \ | |
| libpango-1.0-0 \ | |
| libcairo2 \ | |
| libatspi2.0-0 \ | |
| libxshmfence1 \ | |
| libglu1-mesa \ | |
| ca-certificates \ | |
| fonts-liberation \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Imposta la directory di lavoro all'interno del container. | |
| WORKDIR /app | |
| # CLONA il repository. Questo comando scarica TUTTI i file, incluso requirements.txt. | |
| RUN git clone https://github.com/stremio-manager/EasyProxy . | |
| # Installa le dipendenze Python. | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Installa Chromium gestito da Playwright. | |
| RUN python -m playwright install chromium | |
| # Copia il resto del codice dell'applicazione nella directory di lavoro. | |
| # Metadata dell'immagine OCI (Open Container Initiative) corretti. | |
| LABEL org.opencontainers.image.title="HLS Proxy Server" | |
| LABEL org.opencontainers.image.description="Server proxy universale per stream HLS con supporto Vavoo, DLHD e playlist builder" | |
| LABEL org.opencontainers.image.version="2.5.0" | |
| LABEL org.opencontainers.image.source="https://github.com/realbestia1/EasyProxy" | |
| # Esponi la porta su cui l'applicazione è in ascolto. | |
| EXPOSE 7860 | |
| # Comando per avviare l'app in produzione con Gunicorn | |
| # Usa sh -c per permettere l'espansione delle variabili e il fallback dinamico dei worker | |
| CMD ["sh", "-c", "WORKERS_COUNT=${WORKERS:-$(nproc 2>/dev/null || echo 1)}; xvfb-run -a --server-args='-screen 0 1366x768x24' gunicorn --bind 0.0.0.0:${PORT:-7860} --workers $WORKERS_COUNT --worker-class aiohttp.worker.GunicornWebWorker --timeout 120 --graceful-timeout 120 app:app"] |