Merge pull request #939 from bigcapitalhq/fix/ahmedbouhuolia/docker-healthcheck-endpoint

fix(server): fix Docker healthcheck endpoint
This commit is contained in:
Ahmed Bouhuolia
2026-02-10 00:25:25 +02:00
committed by GitHub
2 changed files with 9 additions and 5 deletions

View File

@@ -1,12 +1,14 @@
import { Controller, Get, Post } from '@nestjs/common'; import { Controller, Get, HttpCode } from '@nestjs/common';
import { PublicRoute } from '@/modules/Auth/guards/jwt.guard';
@Controller('/system_db') @Controller('system_db')
@PublicRoute()
export class SystemDatabaseController { export class SystemDatabaseController {
constructor() {} constructor() {}
@Post()
@Get() @Get()
ping(){ @HttpCode(200)
ping() {
return { status: 'ok' };
} }
} }

View File

@@ -6,6 +6,7 @@ import {
SystemKnexConnectionConfigure, SystemKnexConnectionConfigure,
} from './SystemDB.constants'; } from './SystemDB.constants';
import { knexSnakeCaseMappers } from 'objection'; import { knexSnakeCaseMappers } from 'objection';
import { SystemDatabaseController } from './SystemDB.controller';
const providers = [ const providers = [
{ {
@@ -42,6 +43,7 @@ const providers = [
@Global() @Global()
@Module({ @Module({
controllers: [SystemDatabaseController],
providers: [...providers], providers: [...providers],
exports: [...providers], exports: [...providers],
}) })