modified: Dockerfile
This commit is contained in:
24
Dockerfile
24
Dockerfile
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user