Skip to content

Commit

Permalink
Merge pull request #49 from mollie/feature/MOL-358/PICT-242
Browse files Browse the repository at this point in the history
MOL-358/PICT-242: add docker files
  • Loading branch information
Tung-Huynh-Shopmacher authored Sep 6, 2024
2 parents 35f40a5 + 475a367 commit ee09b60
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM node:18-alpine AS builder

WORKDIR /app

COPY ./processor/package*.json ./

RUN npm install --production --frozen-lockfile

COPY ./processor .

RUN npm run build

FROM node:18-alpine AS runner

WORKDIR /app

# 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

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 ee09b60

Please sign in to comment.