fix(health): Add build_sha and build_time to health endpoint
Reads APP_GIT_SHA and APP_BUILD_TIME env vars set during Docker build. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -45,6 +45,8 @@ interface ApiHealth extends HealthStatus {
|
|||||||
uptime: number;
|
uptime: number;
|
||||||
timestamp: string;
|
timestamp: string;
|
||||||
version: string;
|
version: string;
|
||||||
|
build_sha: string | null;
|
||||||
|
build_time: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface DbHealth extends HealthStatus {
|
interface DbHealth extends HealthStatus {
|
||||||
@@ -113,6 +115,8 @@ async function getApiHealth(): Promise<ApiHealth> {
|
|||||||
uptime: Math.floor((Date.now() - serverStartTime) / 1000),
|
uptime: Math.floor((Date.now() - serverStartTime) / 1000),
|
||||||
timestamp: new Date().toISOString(),
|
timestamp: new Date().toISOString(),
|
||||||
version: packageVersion,
|
version: packageVersion,
|
||||||
|
build_sha: process.env.APP_GIT_SHA && process.env.APP_GIT_SHA !== 'unknown' ? process.env.APP_GIT_SHA : null,
|
||||||
|
build_time: process.env.APP_BUILD_TIME && process.env.APP_BUILD_TIME !== 'unknown' ? process.env.APP_BUILD_TIME : null,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user