This commit is contained in:
2026-08-17 19:08:20 +02:00
parent 312890f6e7
commit 8a8f748784
239 changed files with 369374 additions and 0 deletions

27
frontend/Dockerfile Normal file
View File

@ -0,0 +1,27 @@
# --- Étape 1 : build de l'application Angular ---
FROM node:22-alpine AS build
WORKDIR /app
# Installation des dépendances (couche mise en cache tant que les manifestes
# ne changent pas). On utilise `npm ci` si un lockfile est présent, sinon
# `npm install` (utile tant que le lockfile n'a pas encore été généré/commité).
COPY package.json package-lock.json* ./
RUN if [ -f package-lock.json ]; then npm ci; else npm install; fi
# Copie du code source et build de production.
COPY . .
RUN npm run build
# --- Étape 2 : service par nginx ---
FROM nginx:1.27-alpine
# Configuration nginx (SPA + proxy /api -> backend:8080).
COPY nginx.conf /etc/nginx/conf.d/default.conf
# Copie du build Angular dans la racine servie par nginx.
COPY --from=build /app/dist/pdfeditor-frontend/browser /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]