Files
mtusi2026lab3/.env.example
T
ChernikovandClaude Opus 5.5 54ee33352d ЛР 3 — БВТ2304 — Черников
HAProxy перед двумя репликами API, X-Instance-Id, общая идемпотентность отправки
сообщения в PostgreSQL, двухшаговая остановка реплики по SIGTERM, лимиты CPU/RAM,
хуки stop-one и restart. Проверки отказов, эксперимент и поочерёдное обновление
в scripts/lab3_checks.py, отчёт в REPORT.md, результаты в evidence/, команды для
показа в DEMO.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 18:08:30 +03:00

21 lines
991 B
Bash

# Copy to .env for your LOCAL synthetic test environment; never commit .env.
# docker compose reads .env to fill ${...} in compose.yaml; every value has a default there.
# Passwords are NOT here: they are files in secrets/ (python scripts/init_secrets.py).
APP_ENV=lab
APP_LOG_LEVEL=INFO
# Seconds for graceful stop after SIGTERM (<= 10) and, inside it, how long a replica keeps
# serving while reporting "not ready" so that the load balancer removes it first.
APP_SHUTDOWN_TIMEOUT=8
APP_DRAIN_DELAY=3
# Load balancer ports on 127.0.0.1 of the host (API replicas are not published).
APP_PUBLISHED_PORT=8080
LB_STATS_PORT=8404
API_REPLICAS=2
SESSION_TTL_SECONDS=3600
IDEMPOTENCY_TTL_SECONDS=86400
DB_POOL_SIZE=10
# Fixed inside the containers by compose.yaml (skeleton names kept):
# APP_HOST=0.0.0.0 APP_PORT=8080
# DATABASE_URL_FILE=/run/secrets/database_url CACHE_URL_FILE=/run/secrets/cache_url
# SESSION_STORE from the skeleton is not needed: sessions are always stored in Valkey.