fix: use standalone prisma.config.js to avoid runtime module errors
All checks were successful
Build and Push App / build (push) Successful in 52s
All checks were successful
Build and Push App / build (push) Successful in 52s
This commit is contained in:
@@ -33,7 +33,7 @@ RUN adduser --system --uid 1001 nextjs
|
||||
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/public ./public
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/prisma ./prisma
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/prisma.config.ts ./prisma.config.ts
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/prisma.config.js ./prisma.config.js
|
||||
|
||||
# Set the correct permission for prerender cache
|
||||
RUN mkdir .next
|
||||
|
||||
10
prisma.config.js
Normal file
10
prisma.config.js
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Prisma 7 Configuration
|
||||
* In standalone Docker mode, devDependencies are missing.
|
||||
* This file uses a plain object to avoid 'Cannot find module' errors.
|
||||
*/
|
||||
export default {
|
||||
datasource: {
|
||||
url: process.env.DATABASE_URL,
|
||||
},
|
||||
};
|
||||
@@ -1,7 +0,0 @@
|
||||
import { defineConfig } from '@prisma/config';
|
||||
|
||||
export default defineConfig({
|
||||
datasource: {
|
||||
url: process.env.DATABASE_URL,
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user