show build on website footer
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user