fix: Debug-Modus raus, gunicorn, UIDs statt Sequenznummern, nur http(s)-Links
- Flask-Debugger (Werkzeug, Codeausführung) war offen auf 0.0.0.0:5000; jetzt gunicorn, Healthcheck - Verschieben per UID (Sequenznummern verschieben sich nach dem Expunge), nur Ziffern erlaubt - "Move All" schickte keine IDs mit; Formular enthält jetzt alle UIDs - Links aus Mails nur noch http(s) (kein javascript:/data:), rel=noopener noreferrer - Betreff dekodiert, BODY.PEEK (Mails bleiben ungelesen), Python 3.12, feste Versionen, Nicht-Root - Tests Claude-Session: https://claude.ai/code/session_01SqzF6qT3TQ8ej3wigEuMSu
This commit is contained in:
6 files changed
+227
-111
No files matched your search
+10
-9
@@ -1,18 +1,19 @@
|
||||
# Verwende das offizielle Python-Image als Basis
|
||||
FROM python:3.8-slim
|
||||
FROM python:3.12-slim
|
||||
|
||||
# Setze das Arbeitsverzeichnis innerhalb des Containers
|
||||
WORKDIR /app
|
||||
|
||||
# Installiere die erforderlichen Abhängigkeiten
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Kopiere die Anwendungsdateien in den Container
|
||||
COPY . .
|
||||
COPY app.py index.html result.html ./
|
||||
COPY static ./static
|
||||
|
||||
# Starte die Anwendung, wenn der Container gestartet wird
|
||||
CMD ["python", "app.py"]
|
||||
RUN useradd -m -u 1000 app
|
||||
USER app
|
||||
|
||||
#Expose den Port 5000 (Nur Dokumentation für Entwickler)
|
||||
EXPOSE 5000
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s \
|
||||
CMD python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:5000/health')"
|
||||
|
||||
# gunicorn instead of the Flask development server (no Werkzeug debugger)
|
||||
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "--workers", "2", "--timeout", "120", "app:app"]
|
||||
Reference in new issue
Block a user