feat(version): /api/version + build-time version/commit stamping
Add a VERSION file (0.1.0) and inject APP_VERSION/GIT_SHA/BUILD_DATE as Docker build-args (both stages; Vite inlines them into the SPA). New public GET /api/version returns app_version, git_sha, build_date and the Alembic head as the database revision. deploy.sh and the localdev build pass the args.
This commit is contained in:
parent
5dd3109286
commit
a93ab30fb2
7 changed files with 56 additions and 2 deletions
|
|
@ -26,7 +26,7 @@ from starlette.middleware.sessions import SessionMiddleware
|
|||
|
||||
from app import auth
|
||||
from app.config import settings
|
||||
from app.routes import admin, channels, feed, health, me, quota, sync, tags
|
||||
from app.routes import admin, channels, feed, health, me, quota, sync, tags, version
|
||||
from app.scheduler import shutdown_scheduler, start_scheduler
|
||||
|
||||
|
||||
|
|
@ -68,6 +68,7 @@ app.include_router(me.router)
|
|||
app.include_router(channels.router)
|
||||
app.include_router(admin.router)
|
||||
app.include_router(quota.router)
|
||||
app.include_router(version.router)
|
||||
|
||||
# The built SPA (populated by the Docker frontend build stage).
|
||||
STATIC_DIR = Path(__file__).parent / "static_spa"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue