diora-web/Dockerfile
marwin 0b62fbc0de
All checks were successful
Build and push Docker image / build (push) Successful in 12s
Test / test (push) Successful in 53s
Hotfix: gunicorn/packaging pinnen — gevent-Worker startete nicht mehr
Der erste Rebuild seit dem 17.08. zog gunicorn 26.2.0, dessen ggevent.py
packaging.version importiert, während das Paket selbst überhaupt keine
Dependencies deklariert ("Requires:" ist leer). Damit fehlte packaging im
Image und gunicorn brach beim Start ab:

    Error: class uri 'gevent' invalid or not found
    ModuleNotFoundError: No module named 'packaging'

Beides wandert nach requirements.txt, und das Dockerfile installiert
gunicorn nicht mehr ungepinnt nebenher — sonst kann der nächste Rebuild den
Worker wieder unter uns austauschen.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-28 08:34:27 +00:00

21 lines
520 B
Docker

FROM python:3.12-slim
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
ARG BUILD_TIME
ENV BUILD_TIME=${BUILD_TIME}
COPY . .
RUN python manage.py collectstatic --noinput && mkdir -p /app/data
EXPOSE 8000
CMD ["sh", "-c", "python manage.py migrate --noinput && gunicorn diora.wsgi:application --bind 0.0.0.0:8000 --workers 4 --worker-class gevent --timeout 120"]