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:
@@ -1,5 +1,6 @@
|
||||
.git
|
||||
.github
|
||||
.pnpm-store
|
||||
node_modules
|
||||
.next
|
||||
.turbo
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,6 +2,7 @@
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
.pnpm-store
|
||||
/.pnp
|
||||
.pnp.*
|
||||
.yarn/*
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user