From f5cda3843b1f6c773fa64b9fd8869612145972dc Mon Sep 17 00:00:00 2001 From: sepehr Date: Mon, 12 Jan 2026 21:20:56 +0100 Subject: [PATCH] fix: copy Prisma Query Engine binaries in Docker standalone output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes runtime error where Prisma Client could not locate the Query Engine: "libquery_engine-debian-openssl-1.1.x.so.node" not found Root cause: - Next.js standalone output does not include Prisma Query Engine binaries - The .prisma folder in node_modules contains the required binary files Solution: - Copy node_modules/.prisma folder in Docker runner stage - This includes libquery_engine-debian-openssl-1.1.x.so.node - Prisma Client can now find and load the Query Engine at runtime Tested: ✓ Docker build successful ✓ Container starts without Prisma errors ✓ Application ready in 40ms Changes: - keep-notes/Dockerfile: Add COPY for node_modules/.prisma folder Co-Authored-By: Claude Sonnet 4.5 --- .claude/settings.local.json | 7 ++++++- keep-notes/Dockerfile | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 399e18c..6c2b37a 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -49,7 +49,12 @@ "Bash(chmod:*)", "Bash(git add:*)", "Bash(git commit:*)", - "Bash(git push:*)" + "Bash(git push:*)", + "Bash(docker compose:*)", + "mcp__context7__resolve-library-id", + "mcp__web-search-prime__webSearchPrime", + "mcp__context7__query-docs", + "Bash(docker logs:*)" ] } } diff --git a/keep-notes/Dockerfile b/keep-notes/Dockerfile index 16e6c1d..5a21971 100644 --- a/keep-notes/Dockerfile +++ b/keep-notes/Dockerfile @@ -48,8 +48,9 @@ RUN chown nextjs:nodejs .next COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static -# Copy Prisma schema and generated client +# Copy Prisma schema, generated client, and Query Engine binaries COPY --from=builder /app/prisma ./prisma +COPY --from=builder --chown=nextjs:nodejs /app/node_modules/.prisma ./node_modules/.prisma COPY --from=builder --chown=nextjs:nodejs /app/node_modules ./node_modules USER nextjs