edit build
This commit is contained in:
parent
c6bc8fcd4b
commit
a9cf0b3af7
1 changed files with 7 additions and 5 deletions
|
|
@ -1,13 +1,13 @@
|
|||
# Build Stage
|
||||
FROM node:lts-alpine AS build-stage
|
||||
FROM node:20.19.4-alpine AS build-stage
|
||||
|
||||
# Create app directory
|
||||
WORKDIR /app
|
||||
|
||||
# Install app dependencies
|
||||
COPY package*.json ./
|
||||
|
||||
RUN npm ci
|
||||
#RUN npm ci
|
||||
RUN npm install
|
||||
|
||||
# Copy source files and build the app
|
||||
COPY . .
|
||||
|
|
@ -17,7 +17,7 @@ RUN npm run build
|
|||
FROM node:lts-alpine
|
||||
|
||||
ENV NODE_ENV production
|
||||
USER node
|
||||
# USER node
|
||||
|
||||
# Create app directory
|
||||
WORKDIR /app
|
||||
|
|
@ -27,7 +27,9 @@ COPY --from=build-stage /app/dist ./dist
|
|||
|
||||
# Install only production dependencies
|
||||
COPY package*.json ./
|
||||
RUN npm ci --production
|
||||
#RUN npm ci --production
|
||||
RUN npm install
|
||||
USER node
|
||||
|
||||
# Define the entrypoint and default command
|
||||
# If you have a custom entrypoint script
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue