# --- build stage ----------------------------------------------------------- FROM node:24-alpine AS build WORKDIR /app # Build-time arg : URL publique du backend (inlinée dans le bundle Vite) ARG VITE_BACKEND_URL=http://localhost:8082 ENV VITE_BACKEND_URL=$VITE_BACKEND_URL COPY package*.json ./ RUN npm ci COPY . . RUN npm run build # --- runtime stage --------------------------------------------------------- FROM nginx:alpine AS runtime COPY --from=build /app/dist /usr/share/nginx/html COPY nginx.conf /etc/nginx/conf.d/default.conf EXPOSE 80 CMD ["nginx", "-g", "daemon off;"]