@@ -5,24 +5,17 @@ USER root
55
66WORKDIR /app
77
8- # Copy package files
9- COPY package*.json ./
10-
11- # Install all dependencies (including dev dependencies for building)
12- RUN npm pkg delete scripts.prepare && npm ci --include=dev
13-
14- # Copy source files and config files needed for build
15- COPY tsconfig.json tsconfig.publish.json proxy.config.json config.schema.json integration-test.config.json vite.config.ts index.html index.ts ./
8+ COPY tsconfig.json tsconfig.publish.json proxy.config.json config.schema.json integration-test.config.json vite.config.ts package*.json index.html index.ts ./
169COPY src/ /app/src/
1710COPY public/ /app/public/
1811
1912# Build the UI and server
20- RUN npm run build-ui \
13+ RUN npm pkg delete scripts.prepare \
14+ && npm ci --include=dev \
15+ && npm run build-ui -dd \
2116 && npx tsc --project tsconfig.publish.json \
22- && cp config.schema.json dist/
23-
24- # Prune dev dependencies after build is complete
25- RUN npm prune --omit=dev
17+ && cp config.schema.json dist/ \
18+ && npm prune --omit=dev
2619
2720# Production stage
2821FROM node:20-slim AS production
@@ -33,15 +26,10 @@ RUN apt-get update && apt-get install -y \
3326
3427WORKDIR /app
3528
36- # Copy the modified package.json (without prepare script) and production node_modules from builder
3729COPY --from=builder /app/package*.json ./
3830COPY --from=builder /app/node_modules/ /app/node_modules/
39-
40- # Copy built artifacts from builder stage
4131COPY --from=builder /app/dist/ /app/dist/
4232COPY --from=builder /app/build /app/dist/build/
43-
44- # Copy configuration files needed at runtime
4533COPY proxy.config.json config.schema.json ./
4634
4735# Copy entrypoint script
0 commit comments