Skip to content

Commit 12a60db

Browse files
committed
copy drizzle from multi stage build
1 parent d70b2a3 commit 12a60db

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

web/Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ ENV BETTER_AUTH_SECRET=build-secret
1313
ENV BETTER_AUTH_URL=http://localhost:3000
1414
RUN npx next build
1515

16+
FROM node:24-slim AS drizzle
17+
WORKDIR /drizzle
18+
RUN npm install drizzle-kit drizzle-orm
19+
1620
FROM node:24-slim AS runner
1721
WORKDIR /app
1822
ENV NODE_ENV=production
@@ -22,6 +26,6 @@ COPY --from=builder /app/.next/static ./.next/static
2226
COPY --from=builder /app/public ./public
2327
COPY --from=builder /app/db ./db
2428
COPY --from=builder /app/drizzle.config.ts ./drizzle.config.ts
25-
RUN npm install drizzle-kit drizzle-orm
29+
COPY --from=drizzle /drizzle/node_modules ./node_modules
2630
EXPOSE 3000
2731
CMD ["sh", "-c", "echo y | npx drizzle-kit push && node server.js"]

0 commit comments

Comments
 (0)