2025-10-08 12:12:33 +02:00
|
|
|
# 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
|
2025-10-08 16:07:53 +02:00
|
|
|
#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
|
2025-10-08 12:12:33 +02:00
|
|
|
|
2025-10-08 16:07:53 +02:00
|
|
|
FROM nginx:1.27-alpine as production
|
2025-10-08 12:12:33 +02:00
|
|
|
|
2025-10-08 16:07:53 +02:00
|
|
|
RUN apk add --no-cache bash
|
|
|
|
RUN apk add --no-cache nano
|
2025-10-08 12:12:33 +02:00
|
|
|
|
|
|
|
|
|
|
|
RUN rm -rf /usr/share/nginx/html/*
|
2025-10-08 16:07:53 +02:00
|
|
|
COPY ./blueprint/static ./usr/share/nginx/html
|
|
|
|
|
|
|
|
# Les fichiers sont déjà dans /app/static à l'étape build; inutile de recopier depuis le contexte
|
|
|
|
|
|
|
|
|
2025-10-08 12:12:33 +02:00
|
|
|
EXPOSE 80
|
|
|
|
CMD ["nginx","-g","daemon off;"]
|