From 487e01f76f17120dd97b7a0bd54319ba0bd6ca63 Mon Sep 17 00:00:00 2001 From: Ahmed DCHAR Date: Sun, 12 Apr 2026 02:09:07 +0200 Subject: [PATCH] Set UV_THREADPOOL_SIZE to 1 --- Dockerfile | 10 +++++----- package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index d38e3e2..596b6bc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ COPY package.json package-lock.json ./ # Install dependencies (include optional for native modules like oxc-parser) RUN npm install --legacy-peer-deps && \ - npm cache clean --force + npm cache clean --force # Copy app source COPY . . @@ -26,16 +26,16 @@ COPY package.json package-lock.json ./ # Install production dependencies only with optimizations RUN npm install --omit=dev --legacy-peer-deps && \ - npm cache clean --force && \ - # Remove unnecessary files - rm -rf /root/.npm /root/.cache + npm cache clean --force && \ + # Remove unnecessary files + rm -rf /root/.npm /root/.cache # Copy built app from builder COPY --from=builder /app/.output ./.output # Use non-root user for security RUN addgroup -g 1001 -S nodejs && \ - adduser -S nodejs -u 1001 + adduser -S nodejs -u 1001 USER nodejs diff --git a/package.json b/package.json index 2179b92..0155129 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "private": true, "type": "module", "scripts": { - "build": "nuxt build", + "build": "UV_THREADPOOL_SIZE=1 nuxt build", "dev": "nuxt dev", "preview": "nuxt preview", "postinstall": "nuxt prepare",