forked from miurla/morphic
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (21 loc) · 657 Bytes
/
Dockerfile
File metadata and controls
27 lines (21 loc) · 657 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
# Base image
FROM oven/bun:1.2.12 AS builder
WORKDIR /app
# Install dependencies (separated for better cache utilization)
COPY package.json bun.lock ./
RUN bun install
# Copy source code and build
COPY . .
RUN bun next telemetry disable
RUN bun run build
# Runtime stage
FROM oven/bun:1.2.12 AS runner
WORKDIR /app
# Copy only necessary files from builder
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/public ./public
COPY --from=builder /app/package.json ./package.json
COPY --from=builder /app/bun.lock ./bun.lock
COPY --from=builder /app/node_modules ./node_modules
# Start production server
CMD ["bun", "start", "-H", "0.0.0.0"]