Skip to content

Commit ee09b60

Browse files
Merge pull request #49 from mollie/feature/MOL-358/PICT-242
MOL-358/PICT-242: add docker files
2 parents 35f40a5 + 475a367 commit ee09b60

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

Dockerfile

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
FROM node:18-alpine AS builder
2+
3+
WORKDIR /app
4+
5+
COPY ./processor/package*.json ./
6+
7+
RUN npm install --production --frozen-lockfile
8+
9+
COPY ./processor .
10+
11+
RUN npm run build
12+
13+
FROM node:18-alpine AS runner
14+
15+
WORKDIR /app
16+
17+
# Copy only the necessary built files from the builder stage
18+
COPY --from=builder /app/dist ./dist
19+
COPY --from=builder /app/node_modules ./node_modules
20+
COPY --from=builder /app/package*.json ./
21+
22+
EXPOSE 8080
23+
24+
ENV NODE_ENV=production
25+
26+
CMD ["npm", "run", "start"]
27+
28+
# Metadata
29+
LABEL org.opencontainers.image.authors="Mollie B.V. <info@mollie.com>" \
30+
copyright="Copyright (c) 2024 Mollie B.V. All rights reserved."

0 commit comments

Comments
 (0)