mirror of
https://github.com/R0m1k3/Socialflow.git
synced 2026-10-11 17:26:45 +02:00
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
This commit is contained in:
1 parent
1f58e88d30
commit
151f523a99
1 file changed
+8
-3
+8
-3
@@ -17,7 +17,9 @@ RUN apk add --no-cache \
|
|||||||
jpeg \
|
jpeg \
|
||||||
pango \
|
pango \
|
||||||
giflib \
|
giflib \
|
||||||
pixman
|
pixman \
|
||||||
|
vips-dev \
|
||||||
|
pkgconfig
|
||||||
|
|
||||||
# Copier les fichiers de configuration
|
# Copier les fichiers de configuration
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
@@ -28,8 +30,11 @@ RUN npm install --legacy-peer-deps
|
|||||||
# Copier tout le code source
|
# Copier tout le code source
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Build du frontend et backend
|
# Augmenter la mémoire pour le build (résout les problèmes de mémoire avec Vite)
|
||||||
RUN npm run build
|
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
|
# Nettoyer les fichiers inutiles pour réduire la taille
|
||||||
RUN rm -rf client node_modules/.cache
|
RUN rm -rf client node_modules/.cache
|
||||||
|
|||||||
Reference in new issue
Block a user