30 lines
960 B
Text
30 lines
960 B
Text
![]() |
# 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
|
||
|
RUN mkdir /app/static
|
||
|
COPY ./blueprint/static ./app/static
|
||
|
|
||
|
FROM nginx:1.27-alpine as production
|
||
|
|
||
|
RUN apk add --no-cache bash
|
||
|
RUN apk add --no-cache nano
|
||
|
|
||
|
|
||
|
RUN rm -rf /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;"]
|