From fd4864fd0334e345d7eb1034ea32f9e8c42e83eb Mon Sep 17 00:00:00 2001 From: Viktor Barzin Date: Wed, 11 Feb 2026 22:59:12 +0000 Subject: [PATCH] Fix frontend build OOM: skip tsc, use vite only, bump memory limits - Replace `npm run build` (tsc -b && vite build) with `npx vite build` in Dockerfile since Vite transpiles via SWC independently of tsc. Type-checking is already done in the test step. - Set Node heap to 1024MB (was 384MB which OOMed even for Vite) - Bump Drone pod memory: requests 1.5Gi, limits 3Gi to cover plugins/docker overhead --- .drone.yml | 8 ++++---- frontend/Dockerfile | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.drone.yml b/.drone.yml index 42d1a9b..3c2b1fc 100644 --- a/.drone.yml +++ b/.drone.yml @@ -25,9 +25,9 @@ steps: image: plugins/docker resources: requests: - memory: 1073741824 + memory: 1610612736 limits: - memory: 2147483648 + memory: 3221225472 settings: username: viktorbarzin password: @@ -45,9 +45,9 @@ steps: image: plugins/docker resources: requests: - memory: 1073741824 + memory: 1610612736 limits: - memory: 2147483648 + memory: 3221225472 settings: username: viktorbarzin password: diff --git a/frontend/Dockerfile b/frontend/Dockerfile index bd79e8e..4adcc39 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -13,8 +13,9 @@ RUN npm ci COPY . . # Limit Node.js heap to avoid OOM in constrained CI environments -ENV NODE_OPTIONS="--max-old-space-size=512" -RUN npm run build +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 FROM nginx:alpine