feat: add version display to frontend and /api/version endpoint (v1.2.5)
All checks were successful
Release / build-and-push (push) Successful in 40s
CI / lint-and-test (push) Successful in 22s

- Add GET /api/version endpoint that reads VERSION file
- Frontend fetches version on init and displays it as a badge in the header
- Add version-badge CSS styling
- Update docker-compose.yml comment to v1.2.5
This commit is contained in:
2026-04-20 17:09:02 +02:00
parent a255be93fe
commit 0c3e5ec57b
5 changed files with 35 additions and 3 deletions

View File

@@ -134,6 +134,12 @@ async def metrics():
return Response(content=prometheus_metrics(), media_type="text/plain")
@app.get("/api/version")
async def version():
version_file = Path(__file__).parent.parent / "VERSION"
return {"version": version_file.read_text().strip() if version_file.exists() else "unknown"}
frontend_dir = Path(__file__).parent / "frontend"
app.mount("/", StaticFiles(directory=frontend_dir, html=True), name="frontend")