From 151f523a9958f2f91211ade04b2b863064662bbd Mon Sep 17 00:00:00 2001 From: michaelschal <35957947-michaelschal@users.noreply.replit.com> Date: Mon, 17 Nov 2025 15:49:50 +0000 Subject: [PATCH] Improve build process to prevent memory errors and capture detailed logs Increase Node.js memory allocation and redirect npm build output to a log file in the Dockerfile. Replit-Commit-Author: Agent Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: d28152c3-9a59-42bd-9af9-4b20757ab479 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/2bErQcH --- Dockerfile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 40456fd..31806e0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,9 @@ RUN apk add --no-cache \ jpeg \ pango \ giflib \ - pixman + pixman \ + vips-dev \ + pkgconfig # Copier les fichiers de configuration COPY package*.json ./ @@ -28,8 +30,11 @@ RUN npm install --legacy-peer-deps # Copier tout le code source COPY . . -# Build du frontend et backend -RUN npm run build +# Augmenter la mémoire pour le build (résout les problèmes de mémoire avec Vite) +ENV NODE_OPTIONS="--max-old-space-size=4096" + +# Build du frontend et backend avec logs détaillés +RUN npm run build 2>&1 | tee build.log || (cat build.log && exit 1) # Nettoyer les fichiers inutiles pour réduire la taille RUN rm -rf client node_modules/.cache