Skip to content

Commit

Permalink
MOL-358/PICT-242: update docker file
Browse files Browse the repository at this point in the history
  • Loading branch information
tdang1-shopmacher committed Sep 6, 2024
1 parent e759709 commit 475a367
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,30 @@
FROM node:18-alpine AS builder

WORKDIR /processor
WORKDIR /app

COPY ./processor .
COPY ./processor/package*.json ./

RUN npm install --production --frozen-lockfile

RUN npm install
COPY ./processor .

RUN npm run build

FROM node:18-alpine AS runner

WORKDIR /processor
WORKDIR /app

COPY --from=builder /processor .
# Copy only the necessary built files from the builder stage
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package*.json ./

EXPOSE 8080

CMD [ "npm", "run", "start" ]
ENV NODE_ENV=production

CMD ["npm", "run", "start"]

# Metadata
LABEL org.opencontainers.image.authors="Mollie B.V. <[email protected]>" \
copyright="Copyright (c) 2024 Mollie B.V. All rights reserved."

0 comments on commit 475a367

Please sign in to comment.