Skip to content

Commit 298662c

Browse files
authored
chore(api): generate Prisma client during Docker image build (#1659)
1 parent 9516387 commit 298662c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

apps/api/Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,20 @@ RUN apk add --no-cache wget curl bash libc6-compat openssl
77
WORKDIR /app
88

99
# Copy manifests first and install production deps inside the image (avoid broken bun symlinks)
10-
COPY package.json bun.lock ./
10+
COPY package.json ./
1111

1212
# Install bun and deps
1313
RUN curl -fsSL https://bun.sh/install | bash \
1414
&& export PATH="/root/.bun/bin:$PATH" \
15-
&& (bun install --production --frozen-lockfile --ignore-scripts || bun install --production --ignore-scripts)
15+
&& bun install --production --ignore-scripts
1616

1717
# Now copy the pre-built app contents (dist/, prisma/, etc.)
1818
COPY . .
1919

20+
# Generate Prisma client inside the image (ensures runtime client matches installed deps)
21+
RUN export PATH="/root/.bun/bin:$PATH" \
22+
&& bunx prisma generate
23+
2024
# Set environment variables
2125
ENV NODE_ENV=production
2226
ENV PORT=3333

0 commit comments

Comments
 (0)