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
This commit is contained in:
parent
f9e4960783
commit
fd4864fd03
2 changed files with 7 additions and 6 deletions
|
|
@ -25,9 +25,9 @@ steps:
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
memory: 1073741824
|
memory: 1610612736
|
||||||
limits:
|
limits:
|
||||||
memory: 2147483648
|
memory: 3221225472
|
||||||
settings:
|
settings:
|
||||||
username: viktorbarzin
|
username: viktorbarzin
|
||||||
password:
|
password:
|
||||||
|
|
@ -45,9 +45,9 @@ steps:
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
memory: 1073741824
|
memory: 1610612736
|
||||||
limits:
|
limits:
|
||||||
memory: 2147483648
|
memory: 3221225472
|
||||||
settings:
|
settings:
|
||||||
username: viktorbarzin
|
username: viktorbarzin
|
||||||
password:
|
password:
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,9 @@ RUN npm ci
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Limit Node.js heap to avoid OOM in constrained CI environments
|
# Limit Node.js heap to avoid OOM in constrained CI environments
|
||||||
ENV NODE_OPTIONS="--max-old-space-size=512"
|
ENV NODE_OPTIONS="--max-old-space-size=1024"
|
||||||
RUN npm run build
|
# Skip tsc type-checking (already done in test step); Vite transpiles via SWC
|
||||||
|
RUN npx vite build
|
||||||
|
|
||||||
FROM nginx:alpine
|
FROM nginx:alpine
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue