fix: update PrismaService constructor to use correct datasource format and include prisma.config.ts in Dockerfile
This commit is contained in:
@@ -26,6 +26,7 @@ ENV NODE_ENV=production
|
||||
COPY --from=builder /app/package.json ./package.json
|
||||
COPY --from=builder /app/node_modules ./node_modules
|
||||
COPY --from=builder /app/prisma ./prisma
|
||||
COPY --from=builder /app/prisma.config.ts ./prisma.config.ts
|
||||
COPY --from=builder /app/dist ./dist
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
@@ -9,7 +9,7 @@ export class PrismaService
|
||||
private readonly logger = new Logger(PrismaService.name);
|
||||
|
||||
constructor() {
|
||||
super({ datasourceUrl: process.env.DATABASE_URL });
|
||||
super({ datasources: { db: { url: process.env.DATABASE_URL } } });
|
||||
}
|
||||
|
||||
async onModuleInit() {
|
||||
|
||||
@@ -17,5 +17,6 @@
|
||||
"strictBindCallApply": false,
|
||||
"forceConsistentCasingInFileNames": false,
|
||||
"noFallthroughCasesInSwitch": false
|
||||
}
|
||||
},
|
||||
"exclude": ["node_modules", "prisma.config.ts"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user