Problem
The rest of the polis codebase uses POSTGRES_* env variable names (POSTGRES_HOST, POSTGRES_DB, POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_PORT), defined in example.env and consumed by bin/ scripts, docker-compose.yml, CI workflows, and CDK.
Delphi's Python code uses a different set of names for the same settings:
| Setting |
Repo standard |
Delphi |
| Host |
POSTGRES_HOST |
DATABASE_HOST |
| Port |
POSTGRES_PORT |
DATABASE_PORT |
| Database |
POSTGRES_DB |
DATABASE_NAME |
| User |
POSTGRES_USER |
DATABASE_USER |
| Password |
POSTGRES_PASSWORD |
DATABASE_PASSWORD |
| Connection string |
DATABASE_URL |
DATABASE_URL (same) |
This causes confusion and bugs:
docker-compose.yml bridges the gap with DATABASE_HOST=${POSTGRES_HOST}, which is fragile
- Test files that use the wrong set of names get wrong defaults and fail silently
- Two naming conventions for the same thing is just dirty
Files to update
Delphi files using DATABASE_HOST / DATABASE_* (non-standard names):
delphi/polismath/database/postgres.py — PostgresConfig class and from_env()
delphi/umap_narrative/polismath_commentgraph/utils/storage.py
Proposed fix
Rename DATABASE_HOST → POSTGRES_HOST, DATABASE_NAME → POSTGRES_DB, etc. in the delphi Python code to match the repo-wide convention. DATABASE_URL stays as-is (it's already consistent). The docker-compose.yml mapping (DATABASE_HOST=${POSTGRES_HOST}) can then be removed.
🤖 Generated with Claude Code
Problem
The rest of the polis codebase uses
POSTGRES_*env variable names (POSTGRES_HOST,POSTGRES_DB,POSTGRES_USER,POSTGRES_PASSWORD,POSTGRES_PORT), defined inexample.envand consumed bybin/scripts,docker-compose.yml, CI workflows, and CDK.Delphi's Python code uses a different set of names for the same settings:
POSTGRES_HOSTDATABASE_HOSTPOSTGRES_PORTDATABASE_PORTPOSTGRES_DBDATABASE_NAMEPOSTGRES_USERDATABASE_USERPOSTGRES_PASSWORDDATABASE_PASSWORDDATABASE_URLDATABASE_URL(same)This causes confusion and bugs:
docker-compose.ymlbridges the gap withDATABASE_HOST=${POSTGRES_HOST}, which is fragileFiles to update
Delphi files using
DATABASE_HOST/DATABASE_*(non-standard names):delphi/polismath/database/postgres.py—PostgresConfigclass andfrom_env()delphi/umap_narrative/polismath_commentgraph/utils/storage.pyProposed fix
Rename
DATABASE_HOST→POSTGRES_HOST,DATABASE_NAME→POSTGRES_DB, etc. in the delphi Python code to match the repo-wide convention.DATABASE_URLstays as-is (it's already consistent). Thedocker-compose.ymlmapping (DATABASE_HOST=${POSTGRES_HOST}) can then be removed.🤖 Generated with Claude Code