fix: add version to health endpoint + warn users with stale compose files

Repo migration in March 2026 rewrote all commit hashes, leaving old
clones with a docker-compose.yml that builds from source instead of
pulling pre-built images.  Added detection warnings to compose.sh,
start.bat, and start.sh so affected users see clear instructions.
Also exposes APP_VERSION in /api/health for easier debugging.
This commit is contained in:
anoracleofra-code
2026-03-27 13:56:32 -06:00
parent c81d81ec41
commit c35978c64d
6 changed files with 78 additions and 1 deletions
+3
View File
@@ -12,6 +12,8 @@ from dataclasses import dataclass, field
from typing import Any
from json import JSONDecodeError
APP_VERSION = "0.9.6"
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
_start_time = time.time()
@@ -6667,6 +6669,7 @@ async def health_check(request: Request):
last = d.get("last_updated")
return {
"status": "ok",
"version": APP_VERSION,
"last_updated": last,
"sources": {
"flights": len(d.get("commercial_flights", [])),
+1
View File
@@ -4,6 +4,7 @@ from typing import Optional, Dict, List, Any
class HealthResponse(BaseModel):
status: str
version: str = ""
last_updated: Optional[str] = None
sources: Dict[str, int]
freshness: Dict[str, str]