forked from mongrel-intelligence/cascade
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.router
More file actions
33 lines (25 loc) · 830 Bytes
/
Dockerfile.router
File metadata and controls
33 lines (25 loc) · 830 Bytes
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
# Minimal router image - Node.js with BullMQ and Dockerode for orchestration
FROM node:22-slim AS builder
WORKDIR /app
# Install dependencies
COPY package*.json .npmrc ./
RUN npm ci --ignore-scripts
# Build
COPY tsconfig.json ./
COPY src ./src
RUN npm run build
# Production image - minimal Node.js
FROM node:22-slim AS production
WORKDIR /app
# 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 entire built output — avoids missing-module breaks when router gains new imports
COPY --from=builder /app/dist ./dist
# Copy config
COPY config ./config
ENV PORT=3000
EXPOSE 3000
CMD ["node", "--import", "./dist/instrument.js", "dist/router/index.js"]