# Dockerfile FROM python:3.11-slim # Arbeitsverzeichnis in Container WORKDIR /app # Systemabhängigkeiten (falls erforderlich) RUN apt-get update && \ apt-get install -y --no-install-recommends gcc && \ rm -rf /var/lib/apt/lists/* && \ mkdir -p /app/database # pip auf den neuesten Stand bringen und Requirements installieren COPY requirements.txt ./ RUN pip install --upgrade pip && \ pip install --no-cache-dir -U -r requirements.txt # Anwendungscode kopieren COPY . . # Exponiere Port 5000 für Flask EXPOSE 5000 # Setze Umgebungsvariablen ENV FLASK_APP=app.py ENV FLASK_ENV=production # Wenn eine .env im Arbeitsverzeichnis vorhanden ist, wird sie automatisch von Flask geladen # Startkommando CMD ["python", "app.py"]