Set UV_THREADPOOL_SIZE to 1

This commit is contained in:
Ahmed DCHAR 2026-04-12 02:09:07 +02:00
parent 0216a9b521
commit 487e01f76f
2 changed files with 6 additions and 6 deletions

View File

@ -8,7 +8,7 @@ COPY package.json package-lock.json ./
# Install dependencies (include optional for native modules like oxc-parser) # Install dependencies (include optional for native modules like oxc-parser)
RUN npm install --legacy-peer-deps && \ RUN npm install --legacy-peer-deps && \
npm cache clean --force npm cache clean --force
# Copy app source # Copy app source
COPY . . COPY . .
@ -26,16 +26,16 @@ COPY package.json package-lock.json ./
# Install production dependencies only with optimizations # Install production dependencies only with optimizations
RUN npm install --omit=dev --legacy-peer-deps && \ RUN npm install --omit=dev --legacy-peer-deps && \
npm cache clean --force && \ npm cache clean --force && \
# Remove unnecessary files # Remove unnecessary files
rm -rf /root/.npm /root/.cache rm -rf /root/.npm /root/.cache
# Copy built app from builder # Copy built app from builder
COPY --from=builder /app/.output ./.output COPY --from=builder /app/.output ./.output
# Use non-root user for security # Use non-root user for security
RUN addgroup -g 1001 -S nodejs && \ RUN addgroup -g 1001 -S nodejs && \
adduser -S nodejs -u 1001 adduser -S nodejs -u 1001
USER nodejs USER nodejs

View File

@ -3,7 +3,7 @@
"private": true, "private": true,
"type": "module", "type": "module",
"scripts": { "scripts": {
"build": "nuxt build", "build": "UV_THREADPOOL_SIZE=1 nuxt build",
"dev": "nuxt dev", "dev": "nuxt dev",
"preview": "nuxt preview", "preview": "nuxt preview",
"postinstall": "nuxt prepare", "postinstall": "nuxt prepare",