fix: move NODE_OPTIONS after npm install to fix build OOM
schemas / vulnerabilities (pull_request) Successful in 2m0s
schemas / check (pull_request) Successful in 2m44s
schemas / check-release (pull_request) Successful in 2m53s
pre-commit / pre-commit (pull_request) Successful in 6m30s
schemas / build (pull_request) Successful in 5m51s
schemas / deploy-prod (pull_request) Has been skipped
schemas / vulnerabilities (pull_request) Successful in 2m0s
schemas / check (pull_request) Successful in 2m44s
schemas / check-release (pull_request) Successful in 2m53s
pre-commit / pre-commit (pull_request) Successful in 6m30s
schemas / build (pull_request) Successful in 5m51s
schemas / deploy-prod (pull_request) Has been skipped
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) <noreply@anthropic.com>
This commit is contained in:
+3
-1
@@ -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/
|
||||
|
||||
Reference in New Issue
Block a user