add csc dockerfile

This commit is contained in:
Tykayn 2025-10-08 12:12:33 +02:00 committed by tykayn
parent 6043144905
commit 18ee48d164
2 changed files with 27 additions and 0 deletions

26
Dockerfile Normal file
View file

@ -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;"]

View file

@ -0,0 +1 @@
*.tgz