edit build

This commit is contained in:
kittapath-Jool 2025-09-19 23:54:57 +07:00
parent c6bc8fcd4b
commit a9cf0b3af7

View file

@ -1,13 +1,13 @@
# Build Stage # Build Stage
FROM node:lts-alpine AS build-stage FROM node:20.19.4-alpine AS build-stage
# Create app directory # Create app directory
WORKDIR /app WORKDIR /app
# Install app dependencies # Install app dependencies
COPY package*.json ./ COPY package*.json ./
#RUN npm ci
RUN npm ci RUN npm install
# Copy source files and build the app # Copy source files and build the app
COPY . . COPY . .
@ -17,7 +17,7 @@ RUN npm run build
FROM node:lts-alpine FROM node:lts-alpine
ENV NODE_ENV production ENV NODE_ENV production
USER node # USER node
# Create app directory # Create app directory
WORKDIR /app WORKDIR /app
@ -27,7 +27,9 @@ COPY --from=build-stage /app/dist ./dist
# Install only production dependencies # Install only production dependencies
COPY package*.json ./ COPY package*.json ./
RUN npm ci --production #RUN npm ci --production
RUN npm install
USER node
# Define the entrypoint and default command # Define the entrypoint and default command
# If you have a custom entrypoint script # If you have a custom entrypoint script