FROM python:3.11-slim WORKDIR /app # Abhängigkeiten installieren COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # App-Code COPY app.py . COPY templates/ templates/ # Daten-Verzeichnis für SQLite Datenbank (wird als Volume gemountet) RUN mkdir -p /data && chmod 755 /data # Port 8080 exponieren (unprivileged) EXPOSE 8080 # Health Check HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ CMD python -c "import requests; requests.get('http://localhost:8080/health')" || exit 1 # Starten CMD ["python", "app.py"]