fix: read version from env var so it works inside Docker
This commit is contained in:
@@ -136,8 +136,9 @@ async def metrics():
|
||||
|
||||
@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"}
|
||||
import os
|
||||
|
||||
return {"version": os.environ.get("VERSION", "unknown")}
|
||||
|
||||
|
||||
frontend_dir = Path(__file__).parent / "frontend"
|
||||
|
||||
Reference in New Issue
Block a user