FROM python:3.9-slim WORKDIR /app ENV PYTHONDONTWRITEBYTECODE=1 ENV PYTHONUNBUFFERED=1 COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY . . ENV PORT=8080 EXPOSE 8080 CMD exec gunicorn --bind :$PORT --workers 1 --threads 8 --timeout 0 wsgi:app