From f811d3328388734c54ce504fa2204a1fa6c7043e Mon Sep 17 00:00:00 2001 From: Andreas Knuth Date: Thu, 9 Apr 2026 17:45:34 -0500 Subject: [PATCH] sdfsdf --- Dockerfile | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/Dockerfile b/Dockerfile index c4f0df0..b2ace21 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,22 +1,15 @@ # Stage 1: Build -FROM node:22-alpine AS build +FROM node:20-alpine AS build WORKDIR /app -# Dependencies installieren (Caching nutzen) COPY package*.json ./ RUN npm install -# Code kopieren und bauen (kopiert dank nest-cli.json auch die .hbs/.assets) COPY . . -RUN npm run build +RUN npm run build --configuration=production -# Stage 2: Production Run -FROM node:22-alpine -WORKDIR /app -# Nur Production-Dependencies installieren (hält das Image extrem klein!) -COPY package*.json ./ -RUN npm install --omit=dev -# Kompilierten Code aus Stage 1 übernehmen -COPY --from=build /app/dist ./dist - -# NestJS Standard-Port -EXPOSE 3000 -CMD ["node", "dist/main"] \ No newline at end of file +# Stage 2: Serve +FROM nginx:alpine +# Passe den Pfad an, falls dein Output-Ordner in angular.json anders heißt! +COPY --from=build /app/dist/bay-area-affiliates/browser /usr/share/nginx/html +COPY nginx.conf /etc/nginx/conf.d/default.conf +EXPOSE 80 +CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file