initial feature/react-migration commit
This commit is contained in:
@@ -1,51 +1,24 @@
|
||||
# dashboard/Dockerfile.dev
|
||||
# Entwicklungs-Dockerfile für das Dash-Dashboard
|
||||
# ==========================================
|
||||
# dashboard/Dockerfile.dev (Development)
|
||||
# ==========================================
|
||||
FROM node:lts-alpine
|
||||
|
||||
FROM python:3.13-slim
|
||||
WORKDIR /workspace/dashboard
|
||||
|
||||
# Build args für UID/GID
|
||||
ARG USER_ID=1000
|
||||
ARG GROUP_ID=1000
|
||||
# Install dependencies manager (pnpm optional, npm reicht für Compose-Setup)
|
||||
# RUN npm install -g pnpm
|
||||
|
||||
# Systemabhängigkeiten (falls nötig)
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends locales curl \
|
||||
&& sed -i 's/# de_DE.UTF-8 UTF-8/de_DE.UTF-8 UTF-8/' /etc/locale.gen \
|
||||
&& locale-gen \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
# Copy package files
|
||||
COPY package*.json ./
|
||||
|
||||
# Locale setzen
|
||||
ENV LANG=de_DE.UTF-8 \
|
||||
LANGUAGE=de_DE:de \
|
||||
LC_ALL=de_DE.UTF-8
|
||||
# Install dependencies (nutze npm, da Compose "npm run dev" nutzt)
|
||||
RUN npm install
|
||||
|
||||
# Non-root User anlegen
|
||||
RUN groupadd -g ${GROUP_ID} infoscreen_taa \
|
||||
&& useradd -u ${USER_ID} -g ${GROUP_ID} --shell /bin/bash --create-home infoscreen_taa
|
||||
# Copy source code
|
||||
COPY . .
|
||||
|
||||
# Arbeitsverzeichnis
|
||||
WORKDIR /app
|
||||
# Expose ports
|
||||
EXPOSE 3000 9229
|
||||
|
||||
# Kopiere nur Requirements für schnellen Rebuild
|
||||
COPY dash_using_fullcalendar-0.1.0.tar.gz ./
|
||||
COPY requirements.txt ./
|
||||
COPY requirements-dev.txt ./
|
||||
|
||||
# Installiere Abhängigkeiten
|
||||
RUN pip install --upgrade pip \
|
||||
&& pip install --no-cache-dir -r requirements.txt \
|
||||
&& pip install --no-cache-dir -r requirements-dev.txt
|
||||
|
||||
# Setze Entwicklungs-Modus
|
||||
ENV DASH_DEBUG_MODE=True
|
||||
ENV API_URL=http://server:8000/api
|
||||
|
||||
# Ports für Dash und optional Live-Reload
|
||||
EXPOSE 8050
|
||||
EXPOSE 5678
|
||||
|
||||
# Wechsle zum non-root User
|
||||
USER infoscreen_taa
|
||||
|
||||
# Dev-Start: Dash mit Hot-Reload
|
||||
CMD ["python", "-m", "debugpy", "--listen", "0.0.0.0:5637", "app.py"]
|
||||
# Standard-Dev-Command (wird von Compose überschrieben)
|
||||
CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0", "--port", "3000"]
|
||||
Reference in New Issue
Block a user