README und Dockerfile: Hinweis auf Gunicorn/WSGI und Produktion ergänzt

This commit is contained in:
2025-07-23 11:01:18 +02:00
parent 14f8d30380
commit cce4565f12
2 changed files with 9 additions and 9 deletions

View File

@@ -6,17 +6,14 @@ WORKDIR /app
# Abhängigkeiten kopieren und installieren
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir -r requirements.txt \
&& pip install --no-cache-dir gunicorn
# App-Code kopieren
COPY . .
# Flask-Umgebungsvariablen setzen
ENV FLASK_APP=app.py
ENV FLASK_RUN_HOST=0.0.0.0
# Exponiere Port 5000
EXPOSE 5000
# Starte die App
CMD ["flask", "run"]
# Starte die App mit Gunicorn
CMD ["gunicorn", "-b", "0.0.0.0:5000", "app:app"]