fix: resolver DNS nginx pour éviter cache IP stale après restart backend

This commit is contained in:
deploy
2026-04-30 21:14:27 +00:00
parent a1e7aa46d5
commit 018fb1d70f
57 changed files with 7 additions and 7579 deletions
-25
View File
@@ -1,25 +0,0 @@
# ── Stage 1 : Build Vite ─────────────────────────────────────
FROM node:20-alpine AS builder
WORKDIR /app
COPY package.json ./
RUN npm install --include=dev
COPY . .
# En prod le frontend est servi par nginx qui proxifie /api → backend
# VITE_API_URL est laissé vide : le client utilise le chemin relatif /api
RUN npm run build
# ── Stage 2 : Serveur nginx ───────────────────────────────────
FROM nginx:1.27-alpine AS runtime
# SPA + proxy API
COPY nginx.conf /etc/nginx/conf.d/default.conf
# Assets du build Vite
COPY --from=builder /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]