Skip to content

Commit

Permalink
Update deploy script with longer wait times and error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Cdaprod committed Jun 23, 2024
1 parent 8bf1ad7 commit 0bd8fee
Showing 1 changed file with 22 additions and 19 deletions.
41 changes: 22 additions & 19 deletions clean-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,34 @@ docker-compose -p ts-services -f docker-compose.minio-weaviate-python.ts.yaml do
# Bring up the services with a fresh build
docker-compose -p ts-services -f docker-compose.minio-weaviate-python.ts.yaml up -d --build

echo "Waiting 5 seconds"
sleep 5
echo "Waiting 10 seconds for containers to start"
sleep 10

echo "Docker Processes"
docker ps

echo "Waiting 5 seconds"
sleep 5

# Find container names dynamically
minio_container=$(docker ps --filter "name=ts-services_minio" --format "{{.Names}}")
weaviate_container=$(docker ps --filter "name=ts-services_weaviate" --format "{{.Names}}")
python_app_container=$(docker ps --filter "name=ts-services_python-app" --format "{{.Names}}")

echo "Docker Logs MinIO"
docker logs --tail 20 $minio_container

echo "Waiting 5 seconds"
sleep 5

echo "Docker Logs Weaviate"
docker logs --tail 20 $weaviate_container

echo "Waiting 5 seconds"
sleep 5

echo "Docker Logs Python-App"
docker logs --tail 20 $python_app_container
if [ -z "$minio_container" ]; then
echo "MinIO container not found!"
else
echo "Docker Logs MinIO"
docker logs --tail 20 $minio_container
fi

if [ -z "$weaviate_container" ]; then
echo "Weaviate container not found!"
else
echo "Docker Logs Weaviate"
docker logs --tail 20 $weaviate_container
fi

if [ -z "$python_app_container" ]; then
echo "Python-App container not found!"
else
echo "Docker Logs Python-App"
docker logs --tail 20 $python_app_container
fi

0 comments on commit 0bd8fee

Please sign in to comment.