# dashboard/Dockerfile # Produktions-Dockerfile für die Dash-Applikation # --- Basis-Image --- FROM python:3.13-slim # --- Arbeitsverzeichnis im Container --- WORKDIR /app # --- Systemabhängigkeiten installieren (falls benötigt) --- RUN apt-get update \ && apt-get install -y --no-install-recommends \ build-essential git \ && rm -rf /var/lib/apt/lists/* # --- Python-Abhängigkeiten kopieren und installieren --- COPY requirements.txt ./ RUN pip install --no-cache-dir -r requirements.txt # --- Applikationscode kopieren --- COPY dashboard/ /app # --- Non-Root-User anlegen und Rechte setzen --- ARG USER_ID=1000 ARG GROUP_ID=1000 RUN groupadd -g ${GROUP_ID} infoscreen_taa \ && useradd -u ${USER_ID} -g ${GROUP_ID} \ --shell /bin/bash --create-home infoscreen_taa \ && chown -R infoscreen_taa:infoscreen_taa /app USER infoscreen_taa # --- Port für Dash exposed --- EXPOSE 8050 # --- Startbefehl: Gunicorn mit Dash-Server --- # "app.py" enthält: app = dash.Dash(...); server = app.server CMD ["gunicorn", "-w", "2", "-b", "0.0.0.0:8050", "app:server"]