updated database path logic

This commit is contained in:
2026-07-17 20:02:11 +02:00
parent d9325fce98
commit 2d48e1dace
4 changed files with 43 additions and 3 deletions
+6
View File
@@ -39,6 +39,7 @@ The app is served below `/fatima` by default. Configure the external path in
flask:
url_prefix: "/fatima"
log_file: "/tmp/fatima.log"
database: "instance/calendar.sqlite"
```
Set `URL_PREFIX` in the environment to override this value at deployment time.
@@ -83,6 +84,11 @@ For deployments, `APP_CONFIG` can point to a YAML file elsewhere. `SECRET_KEY`,
override the corresponding values. `DATABASE` should be an absolute path to the
SQLite file used in production.
The YAML `flask.database` path is resolved relative to the directory containing
the selected config file. If it is omitted, the app uses
`instance/calendar.sqlite` beside `flask_fatima.py`; it no longer relies on
Flask's environment-dependent inferred instance directory.
At startup, the app prints a database summary to the Waitress log containing the
resolved path, amount and status totals, distinct recorded-date total, and date
range. Compare that path and those totals with the importer's output to confirm