33 lines
1.0 KiB
Docker
33 lines
1.0 KiB
Docker
# Dockerfile.brancheneinstufung (v4.0 - mit Cloudflare Tunnel)
|
|
FROM python:3.8-slim
|
|
|
|
WORKDIR /app
|
|
ENV PYTHONPATH=/app
|
|
|
|
# System-Abhängigkeiten (inkl. dos2unix & cloudflared-Dependencies)
|
|
# ENTFERNT: Die komplette ngrok-Installation via apt
|
|
# NEU: Nur die Abhängigkeiten, die wir wirklich brauchen (wget, dos2unix)
|
|
RUN apt-get update && apt-get install -y dos2unix wget && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
# NEU: Lade und installiere den cloudflared Connector direkt
|
|
RUN wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 -O /usr/local/bin/cloudflared && \
|
|
chmod +x /usr/local/bin/cloudflared
|
|
|
|
# Python-Abhängigkeiten
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# App-Code kopieren
|
|
COPY . .
|
|
|
|
# Code bereinigen (Zeilenumbrüche) und Startskript ausführbar machen
|
|
# Diese wichtigen Zeilen von dir behalten wir bei!
|
|
RUN dos2unix /app/start.sh
|
|
RUN chmod +x /app/start.sh
|
|
|
|
# NEU: Port 8080 für den Webserver dokumentieren
|
|
EXPOSE 8080
|
|
|
|
# Starte unser neues Start-Skript
|
|
CMD ["/app/start.sh"] |