From 6b6ef1cbabfc3309d9f90ad786a07753b2476d60 Mon Sep 17 00:00:00 2001 From: Vincent Guillet Date: Sat, 22 Nov 2025 16:35:38 +0000 Subject: [PATCH] Update client/Dockerfile --- client/Dockerfile | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/client/Dockerfile b/client/Dockerfile index dfdb9f8..c476bd0 100644 --- a/client/Dockerfile +++ b/client/Dockerfile @@ -1,25 +1,18 @@ -# Étape 1 : build Angular en prod +# Build Angular FROM node:20 AS build WORKDIR /app - COPY package*.json ./ RUN npm install COPY . . -RUN npm run build -- --configuration production +RUN npm run build -# Étape 2 : Nginx pour servir le build -FROM nginx:1.29-alpine -# On nettoie l'html par défaut -RUN rm -rf /usr/share/nginx/html/* +# NGINX final +FROM nginx:stable -# ⚠️ Important : copier le CONTENU de dist/client et pas le dossier lui-même -COPY --from=build /app/dist/client/ /usr/share/nginx/html +COPY --from=build /app/dist/client/browser /usr/share/nginx/html +COPY nginx.conf /etc/nginx/conf.d/default.conf -# (Optionnel) conf SPA perso -# COPY nginx.conf /etc/nginx/conf.d/default.conf - -EXPOSE 80 -CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file +EXPOSE 80 \ No newline at end of file