We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 49f4e3f commit 6cf3b32Copy full SHA for 6cf3b32
scripts/install-im-server.sh
@@ -45,8 +45,19 @@ pushd "${OPENIM_ROOT}"
45
${DOCKER_COMPOSE_COMMAND} stop
46
curl https://gitee.com/openimsdk/openim-docker/raw/main/example/full-openim-server-and-chat.yml -o docker-compose.yml
47
${DOCKER_COMPOSE_COMMAND} up -d
48
-sleep 60
+
49
+# Wait for a short period to allow containers to initialize
50
+sleep 10
51
52
+# Check the status of the containers
53
+if ! ${DOCKER_COMPOSE_COMMAND} ps | grep -q 'Up'; then
54
+ echo "Error: One or more docker containers failed to start."
55
+ ${DOCKER_COMPOSE_COMMAND} logs
56
+ exit 1
57
+fi
58
59
+sleep 50 # Keep the original 60-second wait, adjusted for the 10-second check above
60
${DOCKER_COMPOSE_COMMAND} logs openim-server
61
${DOCKER_COMPOSE_COMMAND} ps
62
-popd
63
+popd
0 commit comments