mirror of
https://github.com/R0m1k3/Socialflow.git
synced 2026-10-11 17:26:45 +02:00
chore: Optimize Docker build by setting Node.js memory before npm install and adding --no-audit --no-fund flags.
This commit is contained in:
1 parent
abfb958340
commit
aa01c7a7fd
1 file changed
+4
-4
+4
-4
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user