initial feature/react-migration commit

This commit is contained in:
2025-06-22 20:57:21 +00:00
parent 6653f3cf72
commit 76f6baf533
66 changed files with 12038 additions and 91 deletions

View File

@@ -1,38 +1,39 @@
# dashboard/Dockerfile
# Produktions-Dockerfile für die Dash-Applikation
# ==========================================
# dashboard/Dockerfile (Production)
# ==========================================
FROM node:lts-alpine AS builder
# --- 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/*
# Copy package files
COPY package*.json ./
COPY pnpm-lock.yaml* ./
# --- Python-Abhängigkeiten kopieren und installieren ---
COPY dash_using_fullcalendar-0.1.0.tar.gz ./
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
# Install pnpm and dependencies
RUN npm install -g pnpm
RUN pnpm install --frozen-lockfile
# --- Applikationscode kopieren ---
COPY dashboard/ /app
# Copy source code
COPY . .
# --- 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
# Build arguments
ARG NODE_ENV=production
ARG VITE_API_URL
# --- Port für Dash exposed ---
EXPOSE 8050
# Build the application
RUN pnpm build
# --- 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"]
# Production stage with nginx
FROM nginx:alpine
# Copy built files to nginx
COPY --from=builder /app/dist /usr/share/nginx/html
# Copy custom nginx config (optional)
COPY nginx.conf /etc/nginx/nginx.conf
# Expose port
EXPOSE 3000
# Start nginx
CMD ["nginx", "-g", "daemon off;"]