chore: unify DB env vars and harden local Postgres startup
- Use BAL_SERVER_DB_* / BAL_SERVER_PG_DSN in bal-pusher, Dockerfiles, scripts and docs instead of the BAL_PUSHER_DB_* duplicates - Default BAL_SERVER_URL to http://127.0.0.1:9133 - Extract PostgreSQL container startup into a shared pg-server.sh sourced by bal-server.sh and bal-pusher.sh - Read the Postgres password from BAL_PG_PASSWORD instead of hardcoding it, and stop printing the password-bearing DSN - Redact a real-looking Gitea token from .env.example (revoke it if it was live)
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
## Database Technology
|
||||
- **Engine:** `sqlite` (Rust `sqlite` crate, version 0.34.0)
|
||||
- **File:** `bal.db` (default, configurable via `BAL_SERVER_DB_FILE` / `BAL_PUSHER_DB_FILE`)
|
||||
- **File:** `bal.db` (default, configurable via `BAL_SERVER_DB_FILE`)
|
||||
- **Connection Management:** Shared `Arc<Mutex<Connection>>` in `bal-server`, single connection in `bal-pusher`.
|
||||
- **WAL Mode:** Enabled via `PRAGMA journal_mode=WAL` with retry logic (up to 5 attempts) for concurrent access safety.
|
||||
- **Busy Timeout:** Set to 5000ms via `PRAGMA busy_timeout=5000`.
|
||||
|
||||
Reference in New Issue
Block a user