feat: dockerize

This commit is contained in:
s-prechtl 2024-09-07 23:39:49 +02:00
parent 325cc6d1af
commit a8da22196a
6 changed files with 833 additions and 1 deletions

15
Dockerfile Normal file
View file

@ -0,0 +1,15 @@
FROM node:22-alpine AS builder
WORKDIR /app
COPY package*.json .
RUN npm ci
COPY . .
RUN npm run build
RUN npm prune --production
FROM node:22-alpine
WORKDIR /app
COPY --from=builder /app/build build/
COPY --from=builder /app/node_modules node_modules/
COPY package.json .
EXPOSE 3000
CMD [ "node", "build" ]