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 <cursoragent@cursor.com>
This commit is contained in:
Ali Taghavi
2026-05-19 10:09:24 +03:30
parent 49ab7cd685
commit 043f351eae
3 changed files with 8 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
.git
.github
.pnpm-store
node_modules
.next
.turbo

1
.gitignore vendored
View File

@@ -2,6 +2,7 @@
# dependencies
/node_modules
.pnpm-store
/.pnp
.pnp.*
.yarn/*

View File

@@ -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