From 25c87da1cf4bb178d04720e2fa070e5bb96f0a99 Mon Sep 17 00:00:00 2001 From: Viktor Barzin Date: Wed, 11 Feb 2026 23:11:55 +0000 Subject: [PATCH] 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. --- .drone.yml | 8 ++++---- frontend/Dockerfile | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.drone.yml b/.drone.yml index 3c2b1fc..26f89fd 100644 --- a/.drone.yml +++ b/.drone.yml @@ -25,9 +25,9 @@ steps: image: plugins/docker resources: requests: - memory: 1610612736 + memory: 2147483648 limits: - memory: 3221225472 + memory: 4294967296 settings: username: viktorbarzin password: @@ -45,9 +45,9 @@ steps: image: plugins/docker resources: requests: - memory: 1610612736 + memory: 2147483648 limits: - memory: 3221225472 + memory: 4294967296 settings: username: viktorbarzin password: diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 4adcc39..e0a9b67 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -3,17 +3,17 @@ FROM node:24-alpine AS builder 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.json package-lock.json* ./ -# Install dependencies (prefers yarn if available) RUN npm ci # Copy all files and build 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 RUN npx vite build