Fix frontend Docker build OOM: limit Node heap + request more memory

- Set NODE_OPTIONS=--max-old-space-size=512 in Dockerfile to cap tsc
  heap usage within constrained CI pods
- Add resource requests (1Gi) and limits (2Gi) to frontend Docker
  build steps in Drone pipeline
This commit is contained in:
Viktor Barzin 2026-02-11 21:50:16 +00:00
parent 34f70b2ba4
commit 6492741757
No known key found for this signature in database
GPG key ID: 0EB088298288D958
2 changed files with 13 additions and 1 deletions

View file

@ -7,11 +7,13 @@ WORKDIR /app
COPY package.json package-lock.json* ./
# Install dependencies (prefers yarn if available)
RUN npm ci
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=512"
RUN npm run build
FROM nginx:alpine