fix: harden deploy workflow health and git sync

This commit is contained in:
cesnimda
2026-03-22 23:29:36 +01:00
parent c818ad7776
commit 691f263bc0
2 changed files with 18 additions and 3 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ docker compose up -d --force-recreate --remove-orphans
sleep 5
docker compose ps
backend_status="$(docker compose ps --format json backend | python -c 'import json,sys; data=[json.loads(line) for line in sys.stdin if line.strip()]; print(data[0].get("State", "") if data else "")')"
backend_status="$(docker compose ps backend --format '{{.State}}' 2>/dev/null | head -n 1 | tr '[:upper:]' '[:lower:]')"
if [ "$backend_status" != "running" ]; then
echo "Backend service is not healthy after deploy (state: ${backend_status:-unknown})."
docker compose logs --tail=200 backend || true