fix: 프로덕션 DB 스키마 미적용 및 PrismaClient 싱글톤 수정

- deploy.sh에 prisma db push 단계 추가 (배포 시 스키마 자동 적용)
- Dockerfile에 Prisma schema 런타임 이미지 복사 추가
- PrismaClient 프로덕션 싱글톤 캐시 활성화 (커넥션 풀 소진 방지)
This commit is contained in:
Johngreen
2026-03-08 23:26:29 +09:00
parent de531bfe11
commit 0c705d00e2
3 changed files with 19 additions and 10 deletions
+2 -7
View File
@@ -12,15 +12,10 @@ export function createPrismaClient(): PrismaClient {
}
const client = new PrismaClient({
log:
process.env['NODE_ENV'] === 'development'
? ['query', 'error', 'warn']
: ['error'],
log: process.env['NODE_ENV'] === 'development' ? ['query', 'error', 'warn'] : ['error'],
});
if (process.env['NODE_ENV'] !== 'production') {
prismaInstance = client;
}
prismaInstance = client;
return client;
}