File size: 720 Bytes
edb4434
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3ffdfd6
edb4434
 
 
 
 
 
3ffdfd6
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Basis-Image
FROM python:3.10-slim

# Arbeitsverzeichnis setzen
WORKDIR /code

# System-Dependencies
RUN apt-get update && \
    apt-get install -y --no-install-recommends \
    build-essential \
    && rm -rf /var/lib/apt/lists/*

# Requirements kopieren und installieren
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# App-Code kopieren
COPY ./app /code/app

# Port freigeben (Discord-Bots nutzen keinen Webserver-Port, aber wir lassen dies für den Healthcheck)
EXPOSE 7860

# Healthcheck hinzufügen
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \
    CMD curl -f http://localhost:7860/ || exit 1

# Start-Command für Discord-Bot
CMD ["python", "app/app.py"]