fix docker, add base routing, header + drawer

This commit is contained in:
Marcus Almert
2025-10-28 17:33:39 +01:00
parent dbf54f59ef
commit b0a42de301
18 changed files with 1461 additions and 214 deletions

View File

@@ -1,24 +1,13 @@
# --- Build Stage ---
FROM node:20 AS build
# --- frontend/Dockerfile.dev ---
FROM node:20-alpine
WORKDIR /app
# 1. Nur package.json zuerst kopieren → Cache für Dependencies
COPY package*.json ./
RUN npm install
# 2. Abhängigkeiten installieren
RUN npm ci
# Source wird gemountet – kein COPY nötig
EXPOSE 5173
# 3. Restlichen Code kopieren
COPY . .
# 4. Sicherstellen, dass vite ausführbar ist (Windows-Berechtigungsfix)
RUN chmod +x node_modules/.bin/vite
# 5. Frontend bauen
RUN npm run build
# --- Serve Stage ---
FROM nginx:alpine
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 3000
CMD ["nginx", "-g", "daemon off;"]
# Kein ENTRYPOINT, direkt CMD
CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0"]