lab2 - оценка 4

This commit is contained in:
Rakshasa2
2026-10-15 12:52:25 +03:00
parent 65003b6119
commit 84a40ae7ac
16 changed files with 2376 additions and 25 deletions
+18
View File
@@ -0,0 +1,18 @@
#!/bin/sh
set -eu
# Перезапускаем все сервисы, сохраняя volumes
docker compose restart api postgres redis
# Ждем, пока API снова станет готовым (healthcheck)
echo "Waiting for API to be ready..."
for i in {1..15}; do
if curl -sf http://localhost:8080/health/ready > /dev/null; then
echo "API is ready."
exit 0
fi
sleep 1
done
echo "API failed to become ready after restart."
exit 1