chore: Optimize Docker build by setting Node.js memory before npm install and adding --no-audit --no-fund flags.

This commit is contained in:
Michael committed 2026-03-24 17:07:16 +01:00
1 parent abfb958340
commit aa01c7a7fd
1 file changed
+4 -4
+4 -4
View File
@@ -38,11 +38,14 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libxtst6 \
&& rm -rf /var/lib/apt/lists/*
# Augmenter la mémoire dès maintenant (npm install + build)
ENV NODE_OPTIONS="--max-old-space-size=4096"
# Copier les fichiers de configuration
COPY package*.json ./
# Installer les dépendances
RUN npm install --legacy-peer-deps
RUN npm install --legacy-peer-deps --no-audit --no-fund
# Copier tout le code source
COPY . .
@@ -56,9 +59,6 @@ RUN mkdir -p server/fonts && \
rm -rf dejavu.tar.bz2 dejavu-fonts-ttf-2.37 && \
echo "✓ Police DejaVu Sans installée"
# Augmenter la mémoire pour le build
ENV NODE_OPTIONS="--max-old-space-size=4096"
# Build du frontend et backend
RUN npm run build