From 18ee48d164618afa12ad740d17dafb80cb7b6355 Mon Sep 17 00:00:00 2001 From: Tykayn Date: Wed, 8 Oct 2025 12:12:33 +0200 Subject: [PATCH] add csc dockerfile --- Dockerfile | 26 ++++++++++++++++++++++++ my-workspace/projects/sae-lib/.gitignore | 1 + 2 files changed, 27 insertions(+) create mode 100644 Dockerfile create mode 100644 my-workspace/projects/sae-lib/.gitignore diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..1cbd9c2 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,26 @@ +# lancer le build: +# docker build -f /home/poule/encrypted/stockage-syncable/www/development/html/ng-implementation/Dockerfile -t csc-app:latest /home/poule/encrypted/stockage-syncable/www/development/html/ng-implementation# +FROM node:24 AS build +WORKDIR /app + +# Copier package.json des deux projets pour tirer parti du cache +COPY sae-csc/package*.json ./sae-csc/ +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 + +# Installer (les scripts de postinstall peuvent casser, on les ignore si besoin) +RUN cd sae-csc && npm ci + + +# 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 +EXPOSE 80 +CMD ["nginx","-g","daemon off;"] \ No newline at end of file diff --git a/my-workspace/projects/sae-lib/.gitignore b/my-workspace/projects/sae-lib/.gitignore new file mode 100644 index 0000000..aa1ec1e --- /dev/null +++ b/my-workspace/projects/sae-lib/.gitignore @@ -0,0 +1 @@ +*.tgz