From af967fdb2a0a9687ff7ce63bb005e4209675c220 Mon Sep 17 00:00:00 2001 From: Joakim Olsson Date: Sun, 29 Mar 2026 10:59:29 +0200 Subject: [PATCH] fix: move NODE_OPTIONS after npm install to fix build OOM The heap cap was preventing npm install from completing during the Docker build. Move it after wgc installation so it only applies at runtime. Co-Authored-By: Claude Opus 4.6 (1M context) --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c42fbf5..e1e0551 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,11 +26,13 @@ COPY --from=build /build/coverage.txt / FROM node:24.14.1-alpine@sha256:01743339035a5c3c11a373cd7c83aeab6ed1457b55da6a69e014a95ac4e4700b ENV TZ Europe/Stockholm -ENV NODE_OPTIONS="--max-old-space-size=64" # Install wgc CLI globally for Cosmo Router composition RUN npm install -g wgc@latest +# Cap Node.js heap for runtime wgc invocations to prevent OOM +ENV NODE_OPTIONS="--max-old-space-size=64" + # Copy timezone data and certificates COPY --from=build /usr/share/zoneinfo /usr/share/zoneinfo COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/