File tree Expand file tree Collapse file tree 1 file changed +9
-15
lines changed
Expand file tree Collapse file tree 1 file changed +9
-15
lines changed Original file line number Diff line number Diff line change 11# Build stage
2- FROM oven/bun:1.2.20 -slim AS builder
2+ FROM oven/bun:1.3.2 -slim AS builder
33
44WORKDIR /app
55
6- # Copy dependency files
76COPY package.json bun.lock turbo.json ./
8- COPY apps/api/package.json ./apps/api/
7+
8+ COPY apps/ ./apps/
99COPY packages/ ./packages/
1010
11- # Install dependencies
12- RUN bun install
11+ RUN bun install --production
1312
14- # Copy source code
15- COPY apps/api/ ./apps/api/
13+ RUN bunx turbo build --filter=@databuddy/api...
1614
17- FROM oven/bun:1.2.20 -slim
15+ FROM oven/bun:1.3.2 -slim
1816
1917WORKDIR /app
2018
21- # Copy built files from builder
19+ COPY -- from= builder /app/package.json ./
2220COPY --from=builder /app/node_modules ./node_modules
2321COPY --from=builder /app/apps/api ./apps/api
2422COPY --from=builder /app/packages ./packages
2523
26- # Set environment variables
27- ENV NODE_ENV=production \
28- PORT=4000 \
29- BUN_ENV=production
3024
31- # Expose port
3225EXPOSE 4000
33- # Start API
26+
3427WORKDIR /app/apps/api
28+
3529CMD ["bun" , "run" , "src/index.ts" ]
You can’t perform that action at this time.
0 commit comments