Commit d72c35a6 authored by Lead VietProDev's avatar Lead VietProDev

feat(env): align .env.example with two-postgres topology

Document the Phase 0 (PLANS.md) split between main and backup DBs in
the example file. .env itself stays out of git per the security rule
in commit.md (line 207) and VIETPRODEV_GUIDELINES.md section 9.

Adds:
- SSO_LOGIN_BACKUP_URL placeholder
- DB_READ_USER / DB_READ_PASSWORD / DB_READ_NAME block
- Comment explaining which block is for write vs read-only fallback

Each operator must still copy .env.example to .env locally and fill in
the actual credentials; only the port numbers and block names live in
the example.
Co-authored-by: 's avatarCursor <cursoragent@cursor.com>
parent a37ad8c9
...@@ -11,6 +11,7 @@ PROJECT_VERSION=1.0.0 ...@@ -11,6 +11,7 @@ PROJECT_VERSION=1.0.0
# ───────────────────────────────────────────── # ─────────────────────────────────────────────
# Database - PostgreSQL (SECRETS - keep in .env) # Database - PostgreSQL (SECRETS - keep in .env)
# ───────────────────────────────────────────── # ─────────────────────────────────────────────
# Main DB: SSO server reads + writes here.
DB_HOST=localhost DB_HOST=localhost
DB_PORT=5432 DB_PORT=5432
DB_USER=postgres DB_USER=postgres
...@@ -18,9 +19,15 @@ DB_PASSWORD=postgres ...@@ -18,9 +19,15 @@ DB_PASSWORD=postgres
DB_NAME=sso DB_NAME=sso
# Connection string (optional: use instead of individual DB_HOST/DB_USER/DB_PASSWORD) # Connection string (optional: use instead of individual DB_HOST/DB_USER/DB_PASSWORD)
DB_CONNECTION_STRING= DB_CONNECTION_STRING=
# Read replica host (for read/write split) # Backup / HA DB: used for failover and (Phase 3) read-only fallback.
# MultiPoolService auto-loads this when SSO_LOGIN_BACKUP_URL is set.
SSO_LOGIN_BACKUP_URL=
# Read-only fallback block (consumed by MultiPoolService.getReadPool()).
DB_READ_HOST= DB_READ_HOST=
DB_READ_PORT=5432 DB_READ_PORT=5433
DB_READ_USER=postgres
DB_READ_PASSWORD=postgres
DB_READ_NAME=sso_backup
DB_POOL_MAX=50 DB_POOL_MAX=50
DB_POOL_MIN=5 DB_POOL_MIN=5
DB_POOL_ACQUIRE=30000 DB_POOL_ACQUIRE=30000
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment