π₯π₯π₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.
TypeScript boardsbug-trackerdjangodockerganttissue-trackerjirajira-alternativekanbanlinearpostgresqlproduct-managementproject-managementproject-planningpythonreactredistypesciptvitework-management
fix(cli): improve API service readiness check in install script (#7468)
Rishi8228ecc0873f
diff --git a/deployments/cli/community/install.sh b/deployments/cli/community/install.shindex 8b8a92ec12..b80f961a3d 100755--- a/deployments/cli/community/install.sh+++ b/deployments/cli/community/install.sh@@ -365,17 +365,49 @@ function startServices() {filocal api_container_id=$(docker container ls -q -f "name=$SERVICE_FOLDER-api")++ # Verify container exists+ if [ -z "$api_container_id" ]; then+ echo " Error: API container not found. Please check if services are running."+ exit 1+ fi+local idx2=0- while ! docker exec $api_container_id python3 -c "import urllib.request; urllib.request.urlopen('http://localhost:8000/')" > /dev/null 2>&1;- do- local message=">> Waiting for API Service to Start"- local dots=$(printf '%*s' $idx2 | tr ' ' '.')+ local api_ready=true # assume success, flip on timeout+ local max_wait_time=300 # 5 minutes timeout+ local start_time=$(date +%s)++ echo " Waiting for API Service to be ready..."+ while ! docker exec "$api_container_id" python3 -c "import urllib.request; urllib.request.urlopen('http://localhost:8000/', timeout=3)" > /dev/null 2>&1; do+ local current_time=$(date +%s)+ local elapsed_time=$((current_time - start_time))++ if [ $elapsed_time -gt $max_wait_time ]; then+ echo ""+ echo " API Service health check timed out after 5 minutes"+ echo " Checking if API container is still running..."+ if docker ps | grep -q "$SERVICE_FOLDER-api"; then+ echo " API container is running but did not pass the health-check. Continuing without marking it ready."+ api_ready=false+ break+ else+ echo " API container is not running. Please check logs."+ exit 1+ fi+ fi++ local message=">> Waiting for API Service to Start (${elapsed_time}s)"+ local dots=$(printf '%*s' $idx2 | tr ' ' '.')echo -ne "\r$message$dots"((idx2++))sleep 1doneprintf "\r\033[K"- echo " API Service started successfully β "+ if [ "$api_ready" = true ]; then+ echo " API Service started successfully β "+ else+ echo " β οΈ API Service did not respond to health-check β please verify manually."+ fisource "${DOCKER_ENV_PATH}"echo " Plane Server started successfully β "echo ""