Реализовать lab3 на оценку 4: HAProxy, реплики API и общая идемпотентность.

This commit is contained in:
2026-10-30 15:27:54 +03:00
parent 0ab3a341aa
commit 5946fe214c
47 changed files with 3035 additions and 31 deletions
+10
View File
@@ -0,0 +1,10 @@
#!/bin/sh
set -eu
# Restart API replicas and all state stores; preserve volumes.
cd "$(dirname "$0")/.."
REPLICAS="${API_REPLICAS:-2}"
docker compose --env-file .env restart postgres redis
# Recreate API fleet at desired scale (migrate already applied; skip one-shot).
docker compose --env-file .env up -d --no-deps --scale "api=${REPLICAS}" api
docker compose --env-file .env restart lb
exit 0