ЛР 2: PostgreSQL, сессии, Redis и исследование

This commit is contained in:
Никита
2026-10-06 13:34:34 +03:00
parent 65003b6119
commit 6a8908ab99
111 changed files with 6686 additions and 38 deletions
+17
View File
@@ -0,0 +1,17 @@
#!/bin/sh
set -eu
cd "$(dirname "$0")/.."
docker compose restart postgres redis >/dev/null
attempt=0
until docker compose exec -T postgres pg_isready -U messenger -d messenger >/dev/null 2>&1; do
attempt=$((attempt + 1))
if [ "$attempt" -ge 60 ]; then
printf '%s\n' 'PostgreSQL did not become ready after restart.' >&2
exit 1
fi
sleep 1
done
docker compose restart api >/dev/null