Add update-available banner + versioned /health endpoint

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
jtricerolph 2026-08-06 14:11:32 +00:00
parent 46441c3b35
commit 951a362dfd
4 changed files with 103 additions and 7 deletions

View file

@ -1,4 +1,6 @@
import logging
import os
import time
from contextlib import asynccontextmanager
from fastapi import FastAPI
@ -57,10 +59,11 @@ app = FastAPI(
version="1.0.0",
lifespan=lifespan,
)
STARTED_AT = str(int(time.time() * 1000))
app.include_router(kds_api.router, prefix="/api/kds", tags=["KDS"])
@app.get("/health")
async def health_check():
return {"status": "healthy"}
return {"status": "healthy", "version": os.environ.get("BUILD_VERSION", STARTED_AT)}