Merge remote-tracking branch 'upstream/main'

This commit is contained in:
dohyeons 2025-10-02 17:39:36 +09:00
commit 8cb7782962
1 changed files with 3 additions and 6 deletions

View File

@ -27,9 +27,6 @@ RUN npm run build
FROM base AS runner FROM base AS runner
ENV NODE_ENV=production ENV NODE_ENV=production
# Create non-root user with specific UID/GID
RUN groupadd -r appgroup --gid 1000 && useradd -r -g appgroup --uid 1000 appuser
# Copy production node_modules # Copy production node_modules
COPY --from=deps /app/node_modules ./node_modules COPY --from=deps /app/node_modules ./node_modules
# Copy built files # Copy built files
@ -37,10 +34,10 @@ COPY --from=build /app/dist ./dist
# Copy package files # Copy package files
COPY package*.json ./ COPY package*.json ./
# Create logs and uploads directories and set permissions # Create logs and uploads directories and set permissions (use existing node user with UID 1000)
RUN mkdir -p logs uploads && chown -R appuser:appgroup logs uploads && chmod -R 755 logs uploads RUN mkdir -p logs uploads && chown -R node:node logs uploads && chmod -R 755 logs uploads
EXPOSE 3001 EXPOSE 3001
USER appuser USER node
CMD ["node", "dist/app.js"] CMD ["node", "dist/app.js"]