-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (23 loc) · 1.1 KB
/
Dockerfile
File metadata and controls
31 lines (23 loc) · 1.1 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
# ── Stage 1: Build frontend ───────────────────────────────────────────────────
FROM oven/bun:1 AS builder
WORKDIR /app
# Install dependencies (workspace-aware)
COPY package.json bun.lock bunfig.toml ./
COPY console/ai-proxy-dashboard/package.json ./console/ai-proxy-dashboard/
RUN bun install --frozen-lockfile
# Copy source and build frontend static assets
COPY . .
RUN bun run build
# ── Stage 2: Runtime ──────────────────────────────────────────────────────────
FROM oven/bun:1 AS runner
WORKDIR /app
# Copy only what's needed at runtime
COPY --from=builder /app/package.json /app/bun.lock /app/bunfig.toml ./
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/src ./src
COPY --from=builder /app/drizzle ./drizzle
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/drizzle.config.ts ./
ENV PORT=3000
EXPOSE 3000
CMD ["bun", "run", "src/server.ts"]