apibrowser2 / Dockerfile
Akwbw's picture
Update Dockerfile
a3e2e7d verified
raw
history blame contribute delete
449 Bytes
FROM mcr.microsoft.com/playwright/python:v1.49.0-jammy
WORKDIR /code
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade -r requirements.txt
RUN playwright install chromium
COPY . .
RUN chmod -R 777 /code
EXPOSE 7860
# --- GOLDEN SETTING FOR STABILITY ---
# workers=1, threads=1 means NO CRASHES.
CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app", "--workers", "1", "--threads", "1", "--worker-class", "sync", "--timeout", "120"]