feat(health): expose app version in GET /health

Surface the deployed app version (app.version, = pyproject 0.1.0) in the
health response for observability. Reuses the FastAPI instance attribute —
no new settings field, no runtime pyproject parsing.

Refs #717
This commit is contained in:
bot-backend 2026-05-30 15:13:03 +03:00
parent 0e2bba78b7
commit d07d10f1df

View file

@ -172,4 +172,8 @@ app.include_router(ping.router, prefix="/api/v1", tags=["ping"])
@app.get("/health") @app.get("/health")
async def health() -> dict[str, str]: async def health() -> dict[str, str]:
return {"status": "ok", "environment": settings.environment} return {
"status": "ok",
"environment": settings.environment,
"version": app.version,
}