heartwood every commit a ring

Increase Node.js heap limit for webpack production build

fa515e93 by Isaac Bythewood · 2 months ago

Increase Node.js heap limit for webpack production build

The webpack build with TerserPlugin and CssMinimizerPlugin runs
out of memory in constrained Docker build environments (~986MB heap
used before OOM). Setting NODE_OPTIONS inline for only this RUN step
raises the limit to 2GB without affecting other processes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
modified Dockerfile
@@ -45,7 +45,7 @@ COPY . .ENV PATH="/app/.venv/bin:/app/node_modules/.bin:$PATH" \    PYTHONPATH="/app/.venv/lib/python3.12/site-packages:$PYTHONPATH"RUN webpack --config webpack.config.js --mode production && \RUN NODE_OPTIONS="--max-old-space-size=2048" webpack --config webpack.config.js --mode production && \    python manage.py collectstatic --noinputRUN chown -R ubuntu:ubuntu /app && \