fix: surface backend deploy failures in workflow

This commit is contained in:
cesnimda
2026-03-22 22:01:28 +01:00
parent 137ce81d5e
commit c4bb6f1474
2 changed files with 4 additions and 3 deletions
+4 -2
View File
@@ -31,8 +31,10 @@ docker compose up -d --force-recreate --remove-orphans
sleep 5
docker compose ps
if ! docker compose ps | grep -q "backend"; then
echo "Backend service not running after deploy"
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 "")')"
if [ "$backend_status" != "running" ]; then
echo "Backend service is not healthy after deploy (state: ${backend_status:-unknown})."
docker compose logs --tail=200 backend || true
exit 1
fi