fix: collab-server Dockerfile use multi-stage build for TypeScript

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-19 16:22:43 -04:00
parent ef302ebda9
commit ea272d229b

View File

@@ -1,12 +1,21 @@
FROM node:22-alpine AS builder
WORKDIR /app
COPY package.json package-lock.json* ./
RUN npm install
COPY . .
RUN ./node_modules/.bin/tsc
FROM node:22-alpine
WORKDIR /app
COPY package.json package-lock.json* ./
RUN npm install --production
RUN npm install --omit=dev
COPY . .
RUN npx tsc
COPY --from=builder /app/dist ./dist
EXPOSE 4000