feat: add health check endpoint and Docker health monitoring
Add a /health endpoint to the application controller and configure Docker health checks. This enables container orchestration systems to monitor the application's liveness and readiness.
This commit is contained in:
9
dist/app.controller.js
vendored
9
dist/app.controller.js
vendored
@@ -64,6 +64,9 @@ let AppController = class AppController {
|
||||
res.redirect('/login');
|
||||
});
|
||||
}
|
||||
health() {
|
||||
return { status: 'ok' };
|
||||
}
|
||||
};
|
||||
exports.AppController = AppController;
|
||||
__decorate([
|
||||
@@ -113,6 +116,12 @@ __decorate([
|
||||
__metadata("design:paramtypes", [Object, Object]),
|
||||
__metadata("design:returntype", void 0)
|
||||
], AppController.prototype, "logout", null);
|
||||
__decorate([
|
||||
(0, common_1.Get)('health'),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", []),
|
||||
__metadata("design:returntype", void 0)
|
||||
], AppController.prototype, "health", null);
|
||||
exports.AppController = AppController = __decorate([
|
||||
(0, common_1.Controller)(),
|
||||
__metadata("design:paramtypes", [users_service_1.UsersService])
|
||||
|
||||
Reference in New Issue
Block a user