28 lines
556 B
Docker
28 lines
556 B
Docker
# Python 3.11 als Basis-Image
|
|
FROM python:3.11-slim
|
|
|
|
# Arbeitsverzeichnis setzen
|
|
WORKDIR /app
|
|
|
|
# Kopiere requirements.txt
|
|
COPY requirements.txt .
|
|
|
|
# Installiere Abhängigkeiten
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Erstelle das data Verzeichnis und setze Berechtigungen
|
|
RUN mkdir -p /app/data && \
|
|
chmod 755 /app/data
|
|
|
|
# Kopiere die Anwendungsdateien
|
|
COPY . /app/
|
|
|
|
# Exponiere Port 5000
|
|
EXPOSE 5000
|
|
|
|
# Setze Umgebungsvariablen
|
|
ENV FLASK_APP=app.py
|
|
ENV FLASK_ENV=production
|
|
|
|
# Starte die Anwendung
|
|
CMD ["flask", "run", "--host=0.0.0.0"] |