From 043f351eae1779e01fa8e77e7b4e9eb4f98febba Mon Sep 17 00:00:00 2001 From: Ali Taghavi Date: Tue, 19 May 2026 10:09:24 +0330 Subject: [PATCH] Fix prebuilt Docker image Prisma COPY conflict with standalone. Replace stub @prisma/client from Next standalone with full bundle engines. Ignore .pnpm-store so it is not committed again. Co-authored-by: Cursor --- .dockerignore | 1 + .gitignore | 1 + Dockerfile.prebuilt | 8 ++++++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.dockerignore b/.dockerignore index e9bad375..b2a2ea47 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,5 +1,6 @@ .git .github +.pnpm-store node_modules .next .turbo diff --git a/.gitignore b/.gitignore index 6376606d..b40808be 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ # dependencies /node_modules +.pnpm-store /.pnp .pnp.* .yarn/* diff --git a/Dockerfile.prebuilt b/Dockerfile.prebuilt index 8b70aea3..a6b5caf7 100644 --- a/Dockerfile.prebuilt +++ b/Dockerfile.prebuilt @@ -16,8 +16,12 @@ COPY iran-bundle/standalone ./ COPY iran-bundle/static ./.next/static COPY iran-bundle/public ./public COPY iran-bundle/prisma-binaries ./prisma-binaries -COPY iran-bundle/node_modules/.prisma ./node_modules/.prisma -COPY iran-bundle/node_modules/@prisma ./node_modules/@prisma +# Standalone ships a stub @prisma/client; replace with full Prisma runtime from the bundle. +COPY iran-bundle/node_modules /tmp/prisma-nm +RUN rm -rf ./node_modules/@prisma ./node_modules/.prisma && \ + cp -a /tmp/prisma-nm/.prisma ./node_modules/ && \ + cp -a /tmp/prisma-nm/@prisma ./node_modules/@prisma && \ + rm -rf /tmp/prisma-nm RUN mkdir -p /app/public/uploads && chown -R nextjs:nodejs /app/public/uploads