File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -45,8 +45,19 @@ pushd "${OPENIM_ROOT}"
45
45
${DOCKER_COMPOSE_COMMAND} stop
46
46
curl https://gitee.com/openimsdk/openim-docker/raw/main/example/full-openim-server-and-chat.yml -o docker-compose.yml
47
47
${DOCKER_COMPOSE_COMMAND} up -d
48
- sleep 60
48
+
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
49
60
${DOCKER_COMPOSE_COMMAND} logs openim-server
50
61
${DOCKER_COMPOSE_COMMAND} ps
51
62
52
- popd
63
+ popd
You can’t perform that action at this time.
0 commit comments