modified: Dockerfile

This commit is contained in:
SimolZimol
2025-05-15 22:31:48 +02:00
parent e8df0c941b
commit 6c16d3b874

View File

@@ -1,17 +1,15 @@
# --- Stage 1: Dependencies installieren ---
FROM python:3.10-slim AS base
# Basis-Image mit Python
FROM python:3.10-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# --- Stage 2: Code kopieren & starten ---
FROM base AS run
WORKDIR /app
COPY . /app
# Port, den Coolify erwartet
EXPOSE 5000
# Arbeitsverzeichnis erstellen
WORKDIR /app
# Kopiere die requirements-Datei und installiere die Abhängigkeiten
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Kopiere den gesamten Projektinhalt in das Arbeitsverzeichnis
COPY . .
ENV FLASK_ENV=$FLASK_ENV
ENV SECRET_KEY=$SECRET_KEY