fix: update dockerfile, gh workflow

This commit is contained in:
2024-05-17 08:53:42 +03:00
parent f0f4d9479c
commit 8f7929d2d6
4 changed files with 68 additions and 19 deletions

View File

@@ -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"]