From 0bd8feec6bbbbc97f4a461ba0c3b9ae5c4d5da47 Mon Sep 17 00:00:00 2001 From: David Cannan <104325852+Cdaprod@users.noreply.github.com> Date: Sun, 23 Jun 2024 12:45:49 -0400 Subject: [PATCH] Update deploy script with longer wait times and error handling --- clean-deploy.sh | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/clean-deploy.sh b/clean-deploy.sh index 8ac9881..20a1c83 100644 --- a/clean-deploy.sh +++ b/clean-deploy.sh @@ -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 \ No newline at end of file +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 \ No newline at end of file