File size: 615 Bytes
1eb7900
a9e005e
 
1eb7900
 
a9e005e
1eb7900
 
 
 
 
 
 
ffc9f59
 
a9e005e
1eb7900
 
 
 
 
a9e005e
1eb7900
924649a
1eb7900
87c5dd3
1eb7900
ffc9f59
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
# 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
EXPOSE 7860

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

# Start-Command
CMD ["python", "app/app.py"]