From 454cc2bea80f83a80eb4d4e787932bd02af51256 Mon Sep 17 00:00:00 2001 From: Chneemann Date: Mon, 21 Sep 2026 13:54:07 +0200 Subject: [PATCH] fix(docker): copy node_modules to runner stage for drizzle-kit --- Dockerfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 24c72a2..768ab4b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -53,13 +53,11 @@ COPY --from=builder /app/public ./public COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static -# Copy the "config" and "db" folders for drizzle-kit into the runner +COPY --from=builder /app/node_modules ./node_modules + COPY --from=builder /app/drizzle.config.ts ./drizzle.config.ts COPY --from=builder /app/db ./db -# Install drizzle-kit & tsx globally so that npx drizzle-kit works inside the container -RUN npm install -g drizzle-kit tsx - RUN mkdir -p /app/data && chown -R nextjs:nodejs /app/data USER nextjs