Move Prisma config to project root as .mjs for Prisma 7
- Move prisma.config.ts to prisma.config.mjs at project root - Use dynamic dotenv import (works in Docker without dotenv) - Add dotenv to devDependencies for local development - Install dotenv globally in Docker for migration support Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -61,13 +61,14 @@ 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 (client and schema for migrations)
|
||||
# Copy Prisma (client, schema, and config for migrations)
|
||||
COPY --from=deps /app/node_modules/.prisma ./node_modules/.prisma
|
||||
COPY --from=deps /app/node_modules/@prisma ./node_modules/@prisma
|
||||
COPY prisma ./prisma/
|
||||
COPY prisma.config.mjs ./
|
||||
|
||||
# Install Prisma CLI globally for migrations
|
||||
RUN npm install -g prisma@7
|
||||
# Install Prisma CLI and dotenv globally for migrations
|
||||
RUN npm install -g prisma@7 dotenv
|
||||
|
||||
USER nextjs
|
||||
|
||||
|
||||
Reference in New Issue
Block a user