-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile.dashboard
More file actions
39 lines (30 loc) · 1.17 KB
/
Dockerfile.dashboard
File metadata and controls
39 lines (30 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Dashboard API image - lightweight Hono server with tRPC
FROM node:22-slim AS builder
WORKDIR /app
# Install dependencies
COPY package*.json .npmrc ./
RUN npm ci --ignore-scripts
# Build
COPY tsconfig.json drizzle.config.ts ./
COPY src ./src
COPY tools ./tools
RUN npm run build
# Production image
FROM node:22-slim AS production
WORKDIR /app
# `cascade.managed=true` is the contract the router's dangling-image cleanup
# loop filters on (src/router/dangling-image-cleanup.ts). Without this LABEL,
# the loop matches zero images and reclaims nothing — see PR #1256.
LABEL cascade.managed=true
# Install curl for health checks
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
# Install only production dependencies
COPY package*.json .npmrc ./
RUN npm ci --omit=dev --ignore-scripts
# Copy all built code (simplest — avoids chasing transitive imports)
COPY --from=builder /app/dist ./dist
# Copy .eta prompt templates (loaded at runtime by agents/prompts via readFileSync)
COPY --from=builder /app/src/agents/prompts/templates ./dist/agents/prompts/templates
ENV PORT=3001
EXPOSE 3001
CMD ["node", "--import", "./dist/instrument.js", "dist/dashboard.js"]