26 lines
No EOL
936 B
Docker
26 lines
No EOL
936 B
Docker
# 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;"] |