File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # Dependencies
21** /node_modules
2+ node_modules
3+
34** /.next
5+ ** /out
46** /dist
7+ ** /build
8+ .next
9+ out
10+ dist
11+ build
12+
13+ ** /.turbo
14+ ** /.wrangler
15+ .turbo
516
6- # Development
717** /.git
818** /.github
919** /.vscode
1020** /.idea
11- ** /* .log
12- ** /.env *
13- ** /.dev.vars
14-
15- # Build outputs
16- ** /build
17- ** /.turbo
18- ** /.wrangler
21+ .idea
22+ .vscode
1923
20- # Test files
2124** /__tests__
2225** /* .test. *
2326** /* .spec. *
2427
25- # Documentation
2628** /* .md
2729** /docs
2830** /LICENSE
2931
30- # Other
31- ** /.DS_Store
32- ** /.env.local
33- ** /.env.development.local
34- ** /.env.test.local
35- ** /.env.production.local
36-
37- # Node Dependencies (these should be installed *inside* the Docker image)
38- # Matches node_modules at the root and in any subdirectory (apps/*, packages/*)
39- ** /node_modules
40- node_modules
41-
42- # Turborepo Cache & Logs
43- .turbo
44- * .log
45-
46- # Build Artifacts (these should be generated *inside* the builder stage)
47- # Add any other build output directories your apps/packages might use
48- ** /dist
49- ** /build
50- ** /.next
51- ** /out
52- dist
53- build
54- .next
55- out
56-
57- # Local Environment Variables & Secrets
58- # Avoid baking secrets into the image. Use runtime ENV variables or Docker secrets.
5932.env *
6033! .env.example
6134! .env.template
35+ ** /.env *
36+ ** /.dev.vars
6237
63- # Test Reports & Coverage
64- coverage
6538** /coverage
39+ coverage
6640lcov.info
6741* .lcov
6842
69- # Operating System / Editor specific files
43+ ** / .DS_Store
7044.DS_Store
7145Thumbs.db
72- .idea
73- .vscode
7446
75- # Dependency Debug Logs
47+ * .log
7648npm-debug.log *
7749yarn-error.log *
7850yarn-debug.log *
7951
80- # Optional: TypeScript build info cache (if using)
8152* .tsbuildinfo
8253
83- # Optional: Specific temporary files or folders
8454tmp /
85- temp /
55+ temp /
Original file line number Diff line number Diff line change @@ -11,25 +11,32 @@ FROM oven/bun:1.3.11-slim AS builder
1111WORKDIR /app
1212
1313COPY --from=pruner /app/out/json/ .
14- RUN bun install --ignore-scripts
14+ RUN bun install --frozen-lockfile -- ignore-scripts
1515
1616COPY --from=pruner /app/out/full/ .
1717COPY turbo.json turbo.json
18- RUN bunx turbo build --filter=@databuddy/api...
1918
20- FROM oven/bun:1.3.11-slim
19+ ENV NODE_ENV=production
20+
21+ WORKDIR /app/apps/api
22+
23+ RUN bun build \
24+ --compile \
25+ --minify \
26+ --sourcemap \
27+ --bytecode \
28+ --outfile /app/server \
29+ ./src/index.ts
30+
31+ FROM oven/bun:1.3.11-distroless
2132
2233WORKDIR /app
2334
24- COPY --from=builder /app/package.json ./
25- COPY --from=builder /app/node_modules ./node_modules
26- COPY --from=builder /app/apps/api ./apps/api
27- COPY --from=builder /app/packages ./packages
35+ COPY --from=builder /app/server server
2836
2937ENV NODE_ENV=production
3038
3139EXPOSE 3001
3240
33- WORKDIR /app/apps/api
34-
35- CMD ["bun" , "run" , "src/index.ts" ]
41+ ENTRYPOINT []
42+ CMD ["./server" ]
Original file line number Diff line number Diff line change 1- FROM oven/bun:1.3.11-slim AS build
1+ FROM oven/bun:1.3.11-slim AS pruner
22
33WORKDIR /app
44
5- COPY package.json package.json
6- COPY bun.lock bun.lock
7- COPY apps/basket/package.json ./apps/basket/package.json
8- COPY packages/*/package.json ./packages/
5+ COPY . .
96
10- COPY packages/ ./packages/
7+ RUN bunx turbo prune @databuddy/basket --docker
118
12- RUN bun install --ignore-scripts
9+ FROM oven/ bun:1.3.11-slim AS builder
1310
14- COPY apps/basket/src ./apps/basket/src
15- COPY apps/basket/tsconfig.json ./apps/basket/tsconfig.json
11+ WORKDIR /app
12+
13+ COPY --from=pruner /app/out/json/ .
14+ RUN bun install --frozen-lockfile --ignore-scripts
15+
16+ COPY --from=pruner /app/out/full/ .
17+ COPY turbo.json turbo.json
1618
1719ENV NODE_ENV=production
1820
1921WORKDIR /app/apps/basket
2022
2123RUN bun build \
2224 --compile \
23- --minify-whitespace \
24- --minify-syntax \
25- --target bun \
26- --outfile /app/server \
25+ --minify \
2726 --sourcemap \
2827 --bytecode \
28+ --outfile /app/server \
2929 ./src/index.ts
3030
3131FROM oven/bun:1.3.11-distroless
3232
3333WORKDIR /app
3434
35- COPY --from=build /app/server server
35+ COPY --from=builder /app/server server
3636
3737ENV NODE_ENV=production
3838
Original file line number Diff line number Diff line change 1- FROM oven/bun:1.3.11-slim AS build
1+ FROM oven/bun:1.3.11-slim AS pruner
22
33WORKDIR /app
44
5- COPY package.json package.json
6- COPY bun.lock bun.lock
7- COPY apps/links/package.json ./apps/links/package.json
8- COPY packages/*/package.json ./packages/
5+ COPY . .
96
10- COPY packages/ ./packages/
7+ RUN bunx turbo prune @databuddy/links --docker
118
12- RUN bun install --ignore-scripts
9+ FROM oven/ bun:1.3.11-slim AS builder
1310
14- COPY apps/links/src ./apps/links/src
15- COPY apps/links/tsconfig.json ./apps/links/tsconfig.json
11+ WORKDIR /app
12+
13+ COPY --from=pruner /app/out/json/ .
14+ RUN bun install --frozen-lockfile --ignore-scripts
15+
16+ COPY --from=pruner /app/out/full/ .
17+ COPY turbo.json turbo.json
1618
1719ENV NODE_ENV=production
1820
1921WORKDIR /app/apps/links
2022
2123RUN bun build \
2224 --compile \
23- --minify-whitespace \
24- --minify-syntax \
25- --target bun \
26- --outfile /app/server \
25+ --minify \
2726 --sourcemap \
2827 --bytecode \
28+ --outfile /app/server \
2929 ./src/index.ts
3030
3131FROM oven/bun:1.3.11-distroless
3232
3333WORKDIR /app
3434
35- COPY --from=build /app/server server
35+ COPY --from=builder /app/server server
3636
3737ENV NODE_ENV=production
3838
Original file line number Diff line number Diff line change 1- FROM oven/bun:1.3.11-slim AS build
1+ FROM oven/bun:1.3.11-slim AS pruner
22
33WORKDIR /app
44
5- COPY package.json package.json
6- COPY bun.lock bun.lock
7- COPY apps/uptime/package.json ./apps/uptime/package.json
8- COPY packages/*/package.json ./packages/
5+ COPY . .
96
10- COPY packages/ ./packages/
7+ RUN bunx turbo prune @databuddy/uptime --docker
118
12- RUN bun install --ignore-scripts
9+ FROM oven/ bun:1.3.11-slim AS builder
1310
14- COPY apps/uptime/src ./apps/uptime/src
15- COPY apps/uptime/tsconfig.json ./apps/uptime/tsconfig.json
11+ WORKDIR /app
12+
13+ COPY --from=pruner /app/out/json/ .
14+ RUN bun install --frozen-lockfile --ignore-scripts
15+
16+ COPY --from=pruner /app/out/full/ .
17+ COPY turbo.json turbo.json
1618
1719ENV NODE_ENV=production
1820
21+ WORKDIR /app/apps/uptime
22+
1923RUN bun build \
20- --compile \
21- --minify-whitespace \
22- --minify-syntax \
23- --target bun \
24- --outfile /app/server \
25- --sourcemap \
26- --bytecode \
27- ./apps/uptime/src/index.ts
24+ --compile \
25+ --minify \
26+ --sourcemap \
27+ --bytecode \
28+ --outfile /app/server \
29+ ./src/index.ts
2830
2931FROM oven/bun:1.3.11-distroless
3032
3133WORKDIR /app
3234
33- COPY --from=build /app/server server
35+ COPY --from=builder /app/server server
3436
3537ENV NODE_ENV=production
3638
You can’t perform that action at this time.
0 commit comments