Balance stateless replicas with shared idempotency and measured failover scaling

This commit is contained in:
2026-10-16 16:02:33 +03:00
parent 0ab3a341aa
commit 4cb20cc68f
155 changed files with 77900 additions and 38 deletions
+15
View File
@@ -0,0 +1,15 @@
"""Generate local synthetic credentials once. Never prints their values."""
from pathlib import Path
import secrets
root=Path(__file__).resolve().parents[1]
target=root/'.env'
if target.exists():
print('Existing .env preserved')
else:
password=secrets.token_hex(24)
content=f'POSTGRES_PASSWORD={password}\nDATABASE_URL=postgresql://messenger:{password}@db:5432/messenger\nREDIS_URL=redis://cache:6379/0\nCURSOR_SECRET={secrets.token_hex(32)}\nSESSION_TTL_SECONDS=3600\n'
with target.open('x',encoding='utf-8') as f: f.write(content)
try: target.chmod(0o600)
except OSError: pass
print('Created local .env; values not displayed')