ci, container: specify NODE_OPTIONS
This commit is contained in:
parent
acc371a804
commit
4ec930ff6a
2 changed files with 3 additions and 2 deletions
|
@ -37,6 +37,7 @@ variables:
|
|||
POSTGRES_PASSWORD: 'password'
|
||||
POSTGRES_HOST_AUTH_METHOD: 'trust'
|
||||
DEBIAN_FRONTEND: 'noninteractive'
|
||||
NODE_OPTIONS: '--max_old_space_size=3072'
|
||||
CARGO_PROFILE_DEV_OPT_LEVEL: '0'
|
||||
CARGO_PROFILE_DEV_LTO: 'off'
|
||||
CARGO_PROFILE_DEV_DEBUG: 'none'
|
||||
|
|
|
@ -26,7 +26,7 @@ COPY packages/backend-rs packages/backend-rs/
|
|||
|
||||
# Compile backend-rs
|
||||
RUN ln -s $(which gcc) /usr/bin/aarch64-linux-musl-gcc
|
||||
RUN NODE_ENV='production' pnpm run --filter backend-rs build
|
||||
RUN NODE_ENV='production' NODE_OPTIONS='--max_old_space_size=3072' pnpm run --filter backend-rs build
|
||||
|
||||
# Copy/Overwrite index.js to mitigate the bug in napi-rs codegen
|
||||
COPY packages/backend-rs/index.js packages/backend-rs/built/index.js
|
||||
|
@ -46,7 +46,7 @@ RUN pnpm install --frozen-lockfile
|
|||
COPY . ./
|
||||
|
||||
# Build other workspaces
|
||||
RUN NODE_ENV='production' pnpm run --recursive --filter '!backend-rs' build && pnpm run build:assets
|
||||
RUN NODE_ENV='production' NODE_OPTIONS='--max_old_space_size=3072' pnpm run --recursive --filter '!backend-rs' build && pnpm run build:assets
|
||||
|
||||
# Trim down the dependencies to only those for production
|
||||
RUN find . -path '*/node_modules/*' -delete && pnpm install --prod --frozen-lockfile
|
||||
|
|
Loading…
Reference in a new issue