fix: update dockerfile, gh workflow
This commit is contained in:
14
Dockerfile
14
Dockerfile
@@ -1,8 +1,14 @@
|
||||
FROM node:22-alpine
|
||||
# Build stage
|
||||
FROM node:20-alpine as build
|
||||
ARG APP_DIR=app
|
||||
RUN mkdir -p ${APP_DIR}
|
||||
WORKDIR ${APP_DIR}
|
||||
|
||||
COPY package*.json ./
|
||||
RUN npm install
|
||||
COPY ./build ./
|
||||
CMD ["npm", "start"]
|
||||
RUN npm ci && npm cache clean --force
|
||||
CMD ["npm", "run", "build"]
|
||||
|
||||
# Run stage
|
||||
FROM node:20-alpine
|
||||
COPY --from=build ./build ./
|
||||
CMD ["node", "index.js"]
|
||||
Reference in New Issue
Block a user