ЛР 3: масштабирование и отказоустойчивость API

This commit is contained in:
EgorAnti
2026-11-03 20:53:02 +03:00
parent 0ab3a341aa
commit 8105f90097
115 changed files with 5018 additions and 38 deletions
+13
View File
@@ -0,0 +1,13 @@
#!/bin/sh
set -eu
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
PROJECT_DIR=$(dirname -- "$SCRIPT_DIR")
cd "$PROJECT_DIR"
# Preserve named volumes and the network. The migration job is intentionally
# not re-run during a same-version restart.
docker compose --env-file .env stop nginx api redis postgres
docker compose --env-file .env up -d --wait --wait-timeout 90 postgres redis
docker compose --env-file .env up -d --wait --wait-timeout 90 --no-deps --scale api=2 api
docker compose --env-file .env up -d --no-deps nginx