feat: add build info (commit SHA + deploy timestamp) to health endpoint and admin sidebar
Some checks failed
Some checks failed
- deploy.sh writes .build-info with commit SHA and timestamp after git pull - /health endpoint now returns version, commit, and deployed_at fields - Admin sidebar footer shows version and commit SHA - Hetzner docs updated: runner --config flag, swap, and runner timeout Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
5
main.py
5
main.py
@@ -306,10 +306,15 @@ def health_check(db: Session = Depends(get_db)):
|
||||
"""Health check endpoint"""
|
||||
try:
|
||||
# Test database connection
|
||||
from app.core.build_info import get_build_info
|
||||
build = get_build_info()
|
||||
db.execute(text("SELECT 1"))
|
||||
return {
|
||||
"status": "healthy",
|
||||
"timestamp": datetime.now(UTC),
|
||||
"version": settings.version,
|
||||
"commit": build["commit"],
|
||||
"deployed_at": build["deployed_at"],
|
||||
"message": f"{settings.project_name} v{settings.version}",
|
||||
"docs": {
|
||||
"swagger": "/docs",
|
||||
|
||||
Reference in New Issue
Block a user