FROM python:3.12-slim RUN apt-get update \ && apt-get install -y --no-install-recommends git \ && rm -rf /var/lib/apt/lists/* \ && git config --system --add safe.directory '*' WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY app.py . ENV PORT=8080 ENV PAGES_ROOT=/pages EXPOSE 8080 CMD ["gunicorn", "--bind", "0.0.0.0:8080", "--workers", "1", "--timeout", "300", "--capture-output", "--access-logfile", "-", "--error-logfile", "-", "app:app"]