Skip to content

Commit 38a9229

Browse files
author
mike dupont
committed
docker running
1 parent 67a6f93 commit 38a9229

File tree

4 files changed

+147
-65
lines changed

4 files changed

+147
-65
lines changed

Dockerfile

+12-11
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ RUN npm install -g bun turbo@2.3.3
1515
# Set Python 3 as the default python
1616
RUN ln -s /usr/bin/python3 /usr/bin/python
1717

18+
FROM builder as installer
19+
1820
# Copy package files
1921
COPY .npmrc .
2022
COPY package.json .
@@ -27,7 +29,6 @@ COPY scripts ./scripts
2729
COPY packages ./packages
2830

2931

30-
3132
# Install dependencies
3233
RUN bun install
3334
RUN bun add better-sqlite3
@@ -36,7 +37,7 @@ RUN bun add better-sqlite3
3637
RUN bun run build
3738

3839
# Create a new stage for the final image
39-
FROM node:23.3.0-slim
40+
FROM builder
4041

4142
WORKDIR /app
4243

@@ -49,15 +50,15 @@ RUN apt-get update && \
4950
# Install bun using npm
5051
RUN npm install -g bun turbo@2.3.3
5152

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
6162

6263
# Set environment variables
6364
ENV NODE_ENV=production

0 commit comments

Comments
 (0)