Angepass an Produtionumgebung

This commit is contained in:
2026-06-21 17:29:39 +02:00
parent 99678ae1be
commit a961a13be2
12 changed files with 349 additions and 14 deletions
+23
View File
@@ -0,0 +1,23 @@
# --- Build-Stage: Statische Dateien mit Vite bauen ---
FROM node:20-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
# --- Serve-Stage: Auslieferung über nginx ---
FROM nginx:alpine
# Eigene nginx-Konfiguration (statische Auslieferung + /api-Proxy)
COPY nginx.conf /etc/nginx/conf.d/default.conf
# Gebaute Dateien aus der Build-Stage übernehmen
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]