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