выполнение работы

This commit is contained in:
altngg
2026-11-24 20:26:37 +03:00
parent 0ab3a341aa
commit e16f7b9974
29 changed files with 1582 additions and 45 deletions
+29
View File
@@ -0,0 +1,29 @@
#!/bin/sh
set -eu
docker compose restart db
attempt=0
until docker compose exec -T db sh -c 'pg_isready -U "$POSTGRES_USER" -d "$POSTGRES_DB"'
do
attempt=$((attempt + 1))
if [ "$attempt" -ge 30 ]; then
echo "PostgreSQL did not become ready"
exit 1
fi
sleep 2
done
docker compose up -d \
--force-recreate \
--no-deps \
--scale api=2 \
api
docker compose restart nginx
echo "Restart completed"