Dockerfile aktualisiert
This commit is contained in:
46
Dockerfile
46
Dockerfile
@@ -1,20 +1,26 @@
|
||||
# Dockerfile
|
||||
|
||||
# Verwende ein offizielles Python-Image als Basis
|
||||
FROM python:3.10-slim
|
||||
|
||||
# Setze Arbeitsverzeichnis
|
||||
WORKDIR /app
|
||||
|
||||
# Kopiere die requirements.txt und installiere die Python-Abhängigkeiten
|
||||
COPY requirements.txt ./
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Kopiere den Rest des Anwendungsquellcodes
|
||||
COPY . .
|
||||
|
||||
# Lade die Umgebungsvariablen aus der .env Datei
|
||||
COPY .env .env
|
||||
|
||||
# Starte das Python-Skript
|
||||
CMD ["python", "bot.py"]
|
||||
# Basis-Image mit Python
|
||||
FROM python:3.10-slim
|
||||
|
||||
# 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 . .
|
||||
|
||||
# Umgebungsvariablen von Coolify übernehmen
|
||||
ENV DISCORD_TOKEN=$DISCORD_TOKEN
|
||||
ENV DB_HOST=$DB_HOST
|
||||
ENV DB_PORT=$DB_PORT
|
||||
ENV DB_USER=$DB_USER
|
||||
ENV DB_PASSWORD=$DB_PASSWORD
|
||||
ENV DB_DATABASE=$DB_DATABASE
|
||||
ENV OPENAI_BASE_URL=$OPENAI_BASE_URL
|
||||
ENV OPENAI_API_KEY=$OPENAI_API_KEY
|
||||
ENV OWNER_ID=$OWNER_ID
|
||||
|
||||
# Startbefehl für den Bot
|
||||
CMD ["python", "bot.py"]
|
||||
|
||||
Reference in New Issue
Block a user