diff --git a/deploy/deploy-pull.sh b/deploy/deploy-pull.sh index 73c85f2..5316434 100644 --- a/deploy/deploy-pull.sh +++ b/deploy/deploy-pull.sh @@ -56,7 +56,12 @@ log "Building API + worker ($GIT_SHA)" log "Building admin UI ($GIT_SHA)" $COMPOSE build --build-arg GIT_SHA="$GIT_SHA" web $COMPOSE up -d --force-recreate web - curl -sf --max-time 10 http://127.0.0.1:8000/api/health >/dev/null + for i in 1 2 3 4 5; do + curl -sf --max-time 8 http://127.0.0.1:8000/api/health >/dev/null && break + log "API not ready yet (attempt $i/5), retrying in 5s..." + sleep 5 + done + curl -sf --max-time 8 http://127.0.0.1:8000/api/health >/dev/null write_status "ok $GIT_SHA $(date -Iseconds)" log "Deploy OK ($GIT_SHA)" log "Refreshing deploy-hook (self-restart — runs detached)"