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:
Jp
2026-02-02 00:54:10 +08:00
parent 3dc74b6aa2
commit 39c16f5090
9 changed files with 28 additions and 2 deletions

View File

@@ -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])