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)
|
# 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
|
||||||
|
|
||||||
|
|||||||
@ -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",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user