diff --git a/scripts/start-with-progress.sh b/scripts/start-with-progress.sh index f846736..d029367 100755 --- a/scripts/start-with-progress.sh +++ b/scripts/start-with-progress.sh @@ -124,6 +124,25 @@ wait_for_service() { fi fi + # Afficher la progression pour SDK Signer + if [ "$service_name" = "SDK Signer" ]; then + if [ $((wait_time - last_progress_time)) -ge $progress_interval ]; then + local logs=$(docker logs "$container_name" --tail 5 2>/dev/null | grep -E "(Disconnected from relay|Scheduling reconnect|WebSocket error)" | tail -1 || echo "") + if [ -n "$logs" ]; then + print_message "${YELLOW}⏳ SDK Signer: Waiting for relay connection (${wait_time}s elapsed)${NC}" + else + local response=$(curl -s -o /dev/null -w '%{http_code}' http://localhost:3001/ 2>/dev/null || echo "000") + if [ "$response" = "101" ] || [ "$response" = "426" ]; then + print_message "${GREEN}✓ SDK Signer ready: WebSocket server responding${NC}" + return 0 + else + print_message "${YELLOW}⏳ SDK Signer starting: WebSocket server not yet ready (${wait_time}s elapsed)${NC}" + fi + fi + last_progress_time=$wait_time + fi + fi + sleep 10 wait_time=$((wait_time + 10)) done @@ -171,8 +190,10 @@ main() { # Attendre les services de base wait_for_service "Tor Proxy" "tor-proxy" 900 # 15 minutes pour Tor bootstrap wait_for_service "SDK Storage" "sdk_storage" 120 - wait_for_service "SDK Signer" "sdk_signer" 300 # 5 minutes pour SDK Signer wait_for_service "Status API" "status-api" 60 + + # SDK Signer peut démarrer même sans relay (il se reconnectera plus tard) + print_message "SDK Signer started (will connect to relay when available)" # Phase 2: Services blockchain (séquentiel) print_message "${PURPLE}Phase 2: Starting blockchain services...${NC}"