Merge pull request #16 from redrockjs/dev

fix: update dockerfile
This commit was merged in pull request #16.
This commit is contained in:
Valeriy G
2024-05-17 10:04:17 +03:00
committed by GitHub

View File

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