diff --git a/deploy.sh b/deploy.sh index 7f2b117..01aa465 100755 --- a/deploy.sh +++ b/deploy.sh @@ -300,7 +300,15 @@ info "Step 12: Verifying deployment..." FAIL=0 -if curl -sf "http://127.0.0.1:${API_PORT}/docs" > /dev/null; then +info " Waiting for API to be ready..." +API_OK=0 +for i in $(seq 1 24); do + if curl -sf "http://127.0.0.1:${API_PORT}/docs" > /dev/null 2>&1; then + API_OK=1; break + fi + sleep 5 +done +if [ "$API_OK" -eq 1 ]; then info " API (port ${API_PORT}): OK" else warn " API (port ${API_PORT}): not responding — check 'docker compose logs api'"