fix: update dockerfile

This commit is contained in:
2024-05-17 09:13:18 +03:00
parent f7ae0b0ddf
commit 01cec421cc

View File

@@ -4,12 +4,11 @@ ARG APP_DIR=app
RUN mkdir -p ${APP_DIR} RUN mkdir -p ${APP_DIR}
WORKDIR ${APP_DIR} WORKDIR ${APP_DIR}
COPY package*.json ./ COPY package*.json ./src/ ./
RUN npm install RUN npm install
COPY ./build ./
CMD ["npm", "run", "build"] CMD ["npm", "run", "build"]
# Run stage # Run stage
FROM node:20-alpine FROM node:20-alpine
COPY --from=build ./index.js ./ COPY --from=build ./build ./
CMD ["node", "index.js"] CMD ["node", "index.js"]