Initial commit - copied workspace after database cleanup
This commit is contained in:
28
dashboard/Dockerfile.dev
Normal file
28
dashboard/Dockerfile.dev
Normal file
@@ -0,0 +1,28 @@
|
||||
# ==========================================
|
||||
# dashboard/Dockerfile.dev (Development)
|
||||
# 🔧 OPTIMIERT: Für schnelle Entwicklung mit Vite und npm
|
||||
# ==========================================
|
||||
FROM node:20-alpine
|
||||
|
||||
# Stelle sicher, dass benötigte Tools verfügbar sind (z. B. für wait-for-backend.sh)
|
||||
RUN apk add --no-cache curl
|
||||
|
||||
# Setze Arbeitsverzeichnis direkt auf das Dashboard-Verzeichnis im Container
|
||||
# (Der Build-Kontext ist ./dashboard, siehe docker-compose.override.yml)
|
||||
WORKDIR /workspace/dashboard
|
||||
|
||||
# KOPIEREN: Nur package-Dateien relativ zum Build-Kontext (KEINE /workspace-Pfade)
|
||||
# package*.json deckt sowohl package.json als auch package-lock.json ab, falls vorhanden
|
||||
COPY package*.json ./
|
||||
|
||||
# Installation robust machen: npm ci erfordert package-lock.json; fallback auf npm install
|
||||
RUN if [ -f package-lock.json ]; then \
|
||||
npm ci --legacy-peer-deps; \
|
||||
else \
|
||||
npm install --legacy-peer-deps; \
|
||||
fi && \
|
||||
npm cache clean --force
|
||||
|
||||
EXPOSE 5173 9230
|
||||
|
||||
CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0", "--port", "5173"]
|
||||
Reference in New Issue
Block a user