23 lines
685 B
Docker
23 lines
685 B
Docker
# --- Stage 1: Dependencies installieren ---
|
|
FROM python:3.10-slim AS base
|
|
|
|
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
|
|
|
|
CLIENT_ID = os.environ.get("SPOTIPY_CLIENT_ID")
|
|
CLIENT_SECRET = os.environ.get("SPOTIPY_CLIENT_SECRET")
|
|
REDIRECT_URI = os.environ.get("SPOTIPY_REDIRECT_URI")
|
|
SECRET_KEY = os.environ.get("SECRET_KEY", "dev_secret_key")
|
|
|
|
# Starten mit Gunicorn für Production
|
|
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "app:app"]
|
|
|