Dockerfile (475B)
1 FROM python:3.12-slim 2 3 WORKDIR /app 4 5 # Install build dependencies for common Python packages 6 RUN apt-get update && apt-get install -y --no-install-recommends \ 7 libpq-dev gcc && \ 8 rm -rf /var/lib/apt/lists/* 9 10 COPY requirements.txt . 11 RUN pip install --no-cache-dir -r requirements.txt gunicorn 12 13 COPY manage.py . 14 COPY mysite/ mysite/ 15 COPY core/ core/ 16 COPY setup.cfg . 17 18 EXPOSE 8000 19 20 CMD ["gunicorn", "mysite.wsgi:application", "--bind", "0.0.0.0:8000", "--workers", "2"]