Files
signage/Dockerfile
Erik Thiele 556ccb211a fix: Zugriffsprotokoll von gunicorn aktivieren
Ohne --access-logfile protokolliert gunicorn keine Requests. Im Log war
dadurch nicht erkennbar, ob eine Anfrage den Container ueberhaupt
erreicht - beim Nachstellen eines Upload-Problems fehlte damit die
grundlegendste Information.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-02 15:57:46 +02:00

26 lines
871 B
Docker

FROM python:3.13-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt gunicorn
COPY . .
RUN addgroup --system --gid 1000 app && \
adduser --system --uid 1000 --ingroup app --disabled-password --disabled-login --no-create-home app && \
chown -R app:app /app && chmod -R u+w /app && \
find / -perm /4000 -o -perm /2000 2>/dev/null | xargs -r chmod ug-s
USER app
ENV HOME=/tmp
# Ohne das puffert Python stdout blockweise, weil es kein Terminal ist -
# die print()-Ausgaben der App tauchen dann nicht in "docker compose logs" auf.
ENV PYTHONUNBUFFERED=1
EXPOSE 5005
# --access-logfile - schreibt jeden Request nach stdout. Ohne das protokolliert
# gunicorn keine Zugriffe, und man sieht nicht, ob eine Anfrage ueberhaupt ankommt.
CMD ["gunicorn", "-b", "0.0.0.0:5005", "-w", "4", "--access-logfile", "-", "app:app"]