add: Dockerfile
Some checks failed
/ build (pull_request) Has been cancelled
/ publish (pull_request) Has been cancelled

This commit is contained in:
h z
2025-05-16 12:18:34 +01:00
parent 05e41d2ccc
commit 3b754fb08e

26
Dockerfile Normal file
View File

@@ -0,0 +1,26 @@
FROM node:20-alpine AS builder
WORKDIR /app
COPY . .
RUN npm ci --ignore-scripts && \
npm run build
FROM node:20-alpine
WORKDIR /app
COPY --from=builder /app/client/bin ./client/bin
COPY --from=builder /app/client/dist ./client/dist
COPY --from=builder /app/server/build ./server/build
COPY --from=builder /app/cli/build ./cli/build
COPY --from=builder /app/package*.json ./
COPY --from=builder /app/sample-config.json ./
RUN npm ci --omit=dev --ignore-scripts
ENV NODE_ENV=production
CMD ["node", "client/bin/start.js"]