| FROM python:3.10-slim | |
| WORKDIR /app | |
| RUN pip install --no-cache-dir flask requests curl_cffi werkzeug loguru gunicorn | |
| VOLUME ["/data"] | |
| COPY . . | |
| ENV PORT=3000 | |
| EXPOSE 3000 | |
| CMD ["gunicorn", "--bind", "0.0.0.0:3000", "--workers", "2", "--threads", "4", "--worker-class", "gthread", "--worker-connections", "1000", "--max-requests", "1000", "--max-requests-jitter", "100", "--timeout", "120", "--keep-alive", "5", "--preload", "app:app"] | |