Move NODE_OPTIONS before npm ci and bump pod memory to 4Gi

npm ci can also OOM during dependency installation. Move the heap
limit before npm ci so it applies to all Node processes. Bump Drone
pod limits to 4Gi (requests 2Gi) to cover Docker-in-Docker overhead.
This commit is contained in:
Viktor Barzin 2026-02-11 23:11:55 +00:00
parent fd4864fd03
commit 25c87da1cf
No known key found for this signature in database
GPG key ID: 0EB088298288D958
2 changed files with 7 additions and 7 deletions

View file

@ -25,9 +25,9 @@ steps:
image: plugins/docker image: plugins/docker
resources: resources:
requests: requests:
memory: 1610612736 memory: 2147483648
limits: limits:
memory: 3221225472 memory: 4294967296
settings: settings:
username: viktorbarzin username: viktorbarzin
password: password:
@ -45,9 +45,9 @@ steps:
image: plugins/docker image: plugins/docker
resources: resources:
requests: requests:
memory: 1610612736 memory: 2147483648
limits: limits:
memory: 3221225472 memory: 4294967296
settings: settings:
username: viktorbarzin username: viktorbarzin
password: password:

View file

@ -3,17 +3,17 @@ FROM node:24-alpine AS builder
WORKDIR /app WORKDIR /app
# Limit Node.js heap to avoid OOM in constrained CI environments
ENV NODE_OPTIONS="--max-old-space-size=1024"
# Copy package files first for better caching # Copy package files first for better caching
COPY package.json package-lock.json* ./ COPY package.json package-lock.json* ./
# Install dependencies (prefers yarn if available)
RUN npm ci RUN npm ci
# Copy all files and build # Copy all files and build
COPY . . COPY . .
# Limit Node.js heap to avoid OOM in constrained CI environments
ENV NODE_OPTIONS="--max-old-space-size=1024"
# Skip tsc type-checking (already done in test step); Vite transpiles via SWC # Skip tsc type-checking (already done in test step); Vite transpiles via SWC
RUN npx vite build RUN npx vite build