From 4994c9b12a5a70993461e76eefde2ebfaea4073b Mon Sep 17 00:00:00 2001 From: Tykayn Date: Wed, 8 Oct 2025 16:07:53 +0200 Subject: [PATCH] dockerfile for static demo --- Dockerfile | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1cbd9c2..2c76eff 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,18 +9,22 @@ COPY my-workspace/projects/sae-lib/package*.json ./my-workspace/projects/sae-lib # Copier le reste des sources -COPY ./my-workspace/projects/sae-lib ./my-workspace/projects/sae-lib -COPY ./sae-csc ./sae-csc +#COPY ./my-workspace/projects/sae-lib ./my-workspace/projects/sae-lib +#COPY ./sae-csc ./sae-csc +RUN mkdir /app/static +COPY ./blueprint/static ./app/static -# Installer (les scripts de postinstall peuvent casser, on les ignore si besoin) -RUN cd sae-csc && npm ci +FROM nginx:1.27-alpine as production + +RUN apk add --no-cache bash +RUN apk add --no-cache nano -# Build de l'app Angular -RUN cd sae-csc && npm run build -- --configuration=production - -FROM nginx:1.27-alpine RUN rm -rf /usr/share/nginx/html/* -COPY --from=build /app/sae-csc/dist/sae-csc /usr/share/nginx/html +COPY ./blueprint/static ./usr/share/nginx/html + +# Les fichiers sont déjà dans /app/static à l'étape build; inutile de recopier depuis le contexte + + EXPOSE 80 CMD ["nginx","-g","daemon off;"] \ No newline at end of file