-
Notifications
You must be signed in to change notification settings - Fork 253
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (22 loc) · 733 Bytes
/
Dockerfile
File metadata and controls
30 lines (22 loc) · 733 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
# Stage 1: Dependencies - install production deps
FROM oven/bun:1 AS deps
WORKDIR /app
# Copy workspace configuration
COPY package.json ./
# Copy package files maintaining workspace structure
COPY apps/server/package.json ./apps/server/package.json
COPY packages/shared/package.json ./packages/shared/package.json
RUN bun install --production
# Stage 2: Runner - final production image
FROM oven/bun:1-slim AS runner
WORKDIR /app
# Copy installed dependencies
COPY --from=deps /app /app
# Copy source code to proper locations
COPY apps/server/src ./apps/server/src
COPY packages/shared ./packages/shared
# Set working directory to server app
WORKDIR /app/apps/server
EXPOSE 8080
ENV NODE_ENV=production
CMD ["bun", "start"]