This commit is contained in:
Tizian.Breuch
2025-08-13 21:49:37 +02:00
parent 0e09f3e5e1
commit b33e800c10
2 changed files with 37 additions and 0 deletions

15
Dockerfile Normal file
View File

@@ -0,0 +1,15 @@
# ----- Stage 1: Build der Angular-Anwendung -----
FROM node:20-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
# Ersetze 'frontend', falls dein Projekt in angular.json anders heißt!
RUN npm run build -- --configuration production
# ----- Stage 2: Serven der Anwendung mit Nginx -----
FROM nginx:stable-alpine
# Ersetze 'frontend', falls dein Projekt in angular.json anders heißt!
COPY --from=build /app/dist/frontend /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80