Merge pull request 'add: Dockerfile' (#1) from create_docker_file into main

Reviewed-on: #1
This commit was merged in pull request #1.
This commit is contained in:
h z
2025-05-16 11:25:36 +00:00

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"]