19 lines
549 B
Docker
19 lines
549 B
Docker
FROM python:3.13-slim
|
|
|
|
ENV PYTHONUNBUFFERED=1 \
|
|
PYTHONDONTWRITEBYTECODE=1
|
|
|
|
WORKDIR /app
|
|
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
COPY . .
|
|
|
|
RUN python manage.py collectstatic --noinput
|
|
|
|
EXPOSE 8000
|
|
|
|
# Demo: bei jedem Start migrieren + Demo-Daten frisch seeden (sauberer Stand),
|
|
# dann via gunicorn ausliefern. SQLite liegt im Container (bewusst flüchtig).
|
|
CMD ["sh", "-c", "python manage.py migrate --noinput && python manage.py seed_demo && gunicorn config.wsgi:application --bind 0.0.0.0:8000 --workers 3"]
|