feat(infra): add replicated API and readiness-aware load balancing

Provide resource profiles, persistent storage, parallel Nginx health checks and graceful restart hooks.
This commit is contained in:
2026-10-29 11:46:56 +03:00
parent 24f32c3fbe
commit 676b38c18b
18 changed files with 394 additions and 27 deletions
+6 -8
View File
@@ -1,13 +1,11 @@
# Copy to .env for your LOCAL synthetic test environment; never commit .env.
# These are logical interface suggestions; map actual framework names in REPORT.md.
APP_HOST=0.0.0.0
# Variables used by compose.yaml for this local lab stack.
APP_PORT=8080
APP_ENV=lab
POSTGRES_DB=chat
POSTGRES_USER=app
POSTGRES_PASSWORD=change_for_local_lab
DB_POOL_MAX=15
CACHE_PREFIX=messenger:cache:v1
SESSION_TTL_SECONDS=3600
# Choose credentials locally. File paths contain no secret values.
DATABASE_URL_FILE=/run/secrets/database_url
# Optional on 3, required use on 4 in lab2; Redis OR Valkey:
SESSION_STORE=postgres
CACHE_URL_FILE=/run/secrets/cache_url
API_REPLICAS=2
IDEMPOTENCY_TTL_SECONDS=86400