test build

This commit is contained in:
kittapath 2025-09-15 22:56:44 +07:00
parent 41c97e5f12
commit 16426f1d0b

View file

@ -16,18 +16,21 @@ RUN npm run build
# Production Stage
FROM node:lts-alpine
ENV NODE_ENV production
USER node
ENV NODE_ENV=production
# Create app directory
WORKDIR /app
# Install only production dependencies as root first
COPY package*.json ./
RUN npm install --production && npm cache clean --force
# Copy built app from build stage
COPY --from=build-stage /app/dist ./dist
# Install only production dependencies
COPY package*.json ./
RUN npm install --production
# Change ownership to node user and switch to node user
RUN chown -R node:node /app
USER node
# Define the entrypoint and default command
# If you have a custom entrypoint script