@@ -15,6 +15,8 @@ RUN npm install -g bun turbo@2.3.3
15
15
# Set Python 3 as the default python
16
16
RUN ln -s /usr/bin/python3 /usr/bin/python
17
17
18
+ FROM builder as installer
19
+
18
20
# Copy package files
19
21
COPY .npmrc .
20
22
COPY package.json .
@@ -27,7 +29,6 @@ COPY scripts ./scripts
27
29
COPY packages ./packages
28
30
29
31
30
-
31
32
# Install dependencies
32
33
RUN bun install
33
34
RUN bun add better-sqlite3
@@ -36,7 +37,7 @@ RUN bun add better-sqlite3
36
37
RUN bun run build
37
38
38
39
# Create a new stage for the final image
39
- FROM node:23.3.0-slim
40
+ FROM builder
40
41
41
42
WORKDIR /app
42
43
@@ -49,15 +50,15 @@ RUN apt-get update && \
49
50
# Install bun using npm
50
51
RUN npm install -g bun turbo@2.3.3
51
52
52
- # Copy built artifacts and production dependencies from the builder stage
53
- COPY --from=builder /app/package.json ./
54
- COPY --from=builder /app/tsconfig.json ./
55
- COPY --from=builder /app/turbo.json ./
56
- COPY --from=builder /app/lerna.json ./
57
- COPY --from=builder /app/renovate.json ./
58
- COPY --from=builder /app/node_modules ./node_modules
59
- COPY --from=builder /app/packages ./packages
60
- COPY --from=builder /app/scripts ./scripts
53
+ # Copy built artifacts and production dependencies from the installer stage
54
+ COPY --from=installer /app/package.json ./
55
+ COPY --from=installer /app/tsconfig.json ./
56
+ COPY --from=installer /app/turbo.json ./
57
+ COPY --from=installer /app/lerna.json ./
58
+ COPY --from=installer /app/renovate.json ./
59
+ COPY --from=installer /app/node_modules ./node_modules
60
+ COPY --from=installer /app/packages ./packages
61
+ COPY --from=installer /app/scripts ./scripts
61
62
62
63
# Set environment variables
63
64
ENV NODE_ENV=production
0 commit comments