database migrated to POSTGRESQL

This commit is contained in:
2026-10-13 16:11:51 +03:30
parent 41ad8c1063
commit 514c3ccaf0
47 changed files with 1500 additions and 891 deletions
+3 -3
View File
@@ -4,7 +4,7 @@ import {
HealthCheck,
HealthCheckService,
MemoryHealthIndicator,
MongooseHealthIndicator,
TypeOrmHealthIndicator,
} from '@nestjs/terminus';
import { HealthService } from './health.service';
@@ -12,7 +12,7 @@ import { HealthService } from './health.service';
export class HealthController {
constructor(
private readonly health: HealthCheckService,
private readonly mongoose: MongooseHealthIndicator,
private readonly database: TypeOrmHealthIndicator,
private readonly memory: MemoryHealthIndicator,
private readonly disk: DiskHealthIndicator,
private readonly healthService: HealthService,
@@ -28,7 +28,7 @@ export class HealthController {
@HealthCheck({ swaggerDocumentation: false })
readiness() {
return this.health.check([
() => this.mongoose.pingCheck('mongodb', { timeout: 1000 }),
() => this.database.pingCheck('postgres', { timeout: 1000 }),
() => this.memory.checkHeap('memory_heap', this.healthService.heapThresholdBytes()),
() =>
this.disk.checkStorage('disk', {