README und Dockerfile: Hinweis auf Gunicorn/WSGI und Produktion ergänzt
This commit is contained in:
11
Dockerfile
11
Dockerfile
@@ -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"]
|
Reference in New Issue
Block a user