Set UV_THREADPOOL_SIZE to 1
This commit is contained in:
parent
0216a9b521
commit
487e01f76f
10
Dockerfile
10
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
|
||||
|
||||
|
||||
@ -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",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user