DaemonConfig.from_env() now best-effort loads a .env file (find_dotenv usecwd, load_dotenv override=False) so operators can manage daemon env vars via .env, with real OS env taking precedence. Add python-dotenv dependency, gitignore .env, ship .env.example, and add config tests (load / OS-env precedence / absence regression / missing-DSN guard). Verification: 78 passed, ruff clean, .env ignored + .env.example tracked, and a .env-only DaemonConfig smoke. Processed via the minor-change fast path: REQ-010 (Configuration) -> Implemented, BAT-003 (batch-lite, no design) -> release-candidate. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
11 lines
368 B
Bash
11 lines
368 B
Bash
# trex-core slot-core daemon configuration (copy to .env; .env is gitignored).
|
|
# Real OS environment variables take precedence over values in .env.
|
|
|
|
# Required: psycopg DSN for the PostgreSQL single-writer store.
|
|
TREX_POSTGRESQL_DSN=dbname=trex_core host=/var/run/postgresql
|
|
|
|
# Optional (defaults shown).
|
|
TREX_TOTAL_SLOTS=10
|
|
TREX_API_HOST=127.0.0.1
|
|
TREX_API_PORT=8080
|