show build on website footer

This commit is contained in:
2026-07-07 16:12:12 +02:00
parent ffa34815cd
commit 8f64760add
7 changed files with 106 additions and 0 deletions
+15
View File
@@ -51,6 +51,7 @@ The app uses HTTP Basic Auth. Current credentials are defined in `BETA_USERS` in
├── app.py
├── requirements.txt
├── README.md
├── build_info.json
├── access_log.json
├── config.json
├── article-data_.json
@@ -101,6 +102,7 @@ The template contains:
- Page layout and all main CSS.
- A disclaimer modal shown after Basic Auth login and before calculator use.
- Footer build metadata from `build_info`.
- Global state:
- `window.ARTICLE_DATA`
- `window.APP_CONFIG`
@@ -261,6 +263,19 @@ JSON audit log written by `app.py`.
Important implementation detail: each logged access reads and rewrites the entire JSON file. This is simple but not concurrency-safe and can become inefficient as the file grows.
### `build_info.json`
Deployment/build metadata displayed in the site footer.
Expected fields:
- `version`
- `branch`
- `commit`
- `timestamp`
`app.py` loads this file centrally at startup and exposes it to all templates as `build_info`. If the file is missing, invalid, or a field is empty, the affected values fall back to `unknown` and the website continues to work.
### `fix_article_data.py`
Utility script that updates relative frontend fetch/register paths to Flask-style `/static/...` paths and checks that key static files exist.