24 lines
727 B
Docker
24 lines
727 B
Docker
# ---- Étape build (Node) ----
|
|
FROM node:22-alpine AS build
|
|
WORKDIR /app
|
|
|
|
# Dépendances (couche cache indépendante du code source)
|
|
COPY package*.json ./
|
|
RUN npm ci
|
|
|
|
# Code source + build production (utilise environment.prod.ts via fileReplacements)
|
|
COPY . .
|
|
RUN npm run build -- --configuration production
|
|
|
|
# ---- Étape serve (nginx) ----
|
|
FROM nginx:1.27-alpine AS serve
|
|
|
|
# Configuration nginx : SPA Angular + reverse-proxy /api + en-têtes anti-indexation
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
|
|
# Le builder @angular-devkit/build-angular:application (Angular 22) émet les fichiers
|
|
# statiques dans dist/<projet>/browser.
|
|
COPY --from=build /app/dist/satpro-specs-frontend/browser /usr/share/nginx/html
|
|
|
|
EXPOSE 80
|