Browse Source

Setup liveness probe endpoint

pull/8037/head
Thomas Kaul 2 weeks ago
parent
commit
273c9e23c2
  1. 8
      apps/api/src/app/health/health.controller.ts
  2. 2
      libs/common/src/lib/interfaces/index.ts
  3. 3
      libs/common/src/lib/interfaces/responses/liveness-health-response.interface.ts

8
apps/api/src/app/health/health.controller.ts

@ -3,7 +3,8 @@ import { TransformDataSourceInRequestInterceptor } from '@ghostfolio/api/interce
import {
AiServiceHealthResponse,
DataEnhancerHealthResponse,
DataProviderHealthResponse
DataProviderHealthResponse,
LivenessHealthResponse
} from '@ghostfolio/common/interfaces';
import {
@ -116,4 +117,9 @@ export class HealthController {
.json({ status: getReasonPhrase(StatusCodes.SERVICE_UNAVAILABLE) });
}
}
@Get('liveness')
public getLiveness(): LivenessHealthResponse {
return { status: getReasonPhrase(StatusCodes.OK) };
}
}

2
libs/common/src/lib/interfaces/index.ts

@ -68,6 +68,7 @@ import type { ExportResponse } from './responses/export-response.interface';
import type { HistoricalResponse } from './responses/historical-response.interface';
import type { ImportResponse } from './responses/import-response.interface';
import type { InfoResponse } from './responses/info-response.interface';
import type { LivenessHealthResponse } from './responses/liveness-health-response.interface';
import type { LookupResponse } from './responses/lookup-response.interface';
import type { MarketDataOfMarketsResponse } from './responses/market-data-of-markets-response.interface';
import type { OAuthResponse } from './responses/oauth-response.interface';
@ -156,6 +157,7 @@ export {
InfoResponse,
InvestmentItem,
LineChartItem,
LivenessHealthResponse,
LookupItem,
LookupResponse,
MarketData,

3
libs/common/src/lib/interfaces/responses/liveness-health-response.interface.ts

@ -0,0 +1,3 @@
export interface LivenessHealthResponse {
status: string;
}
Loading…
Cancel
Save