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:
npeter83 2026-06-15 00:06:57 +02:00
parent 5dd3109286
commit a93ab30fb2
7 changed files with 56 additions and 2 deletions

View file

@ -9,6 +9,11 @@ class Settings(BaseSettings):
model_config = SettingsConfigDict(env_file=".env", extra="ignore")
app_name: str = "Siftlode"
# Build/version info, injected at image build time (Docker build-args -> env). Defaults
# apply for un-built/dev runs; the About dialog and version banner surface these.
app_version: str = "dev"
git_sha: str = "unknown"
build_date: str = ""
database_url: str = "postgresql+psycopg://subfeed:subfeed@db:5432/subfeed"