Skip to content

Commit

Permalink
fix: install-im-server (#1648)
Browse files Browse the repository at this point in the history
Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com>
  • Loading branch information
cubxxw committed Jan 2, 2024
1 parent 3fffc2f commit d594d6f
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions scripts/install-im-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,19 @@ pushd "${OPENIM_ROOT}"
${DOCKER_COMPOSE_COMMAND} stop
curl https://gitee.com/openimsdk/openim-docker/raw/main/example/full-openim-server-and-chat.yml -o docker-compose.yml
${DOCKER_COMPOSE_COMMAND} up -d
sleep 60

# Wait for a short period to allow containers to initialize
sleep 10

# Check the status of the containers
if ! ${DOCKER_COMPOSE_COMMAND} ps | grep -q 'Up'; then
echo "Error: One or more docker containers failed to start."
${DOCKER_COMPOSE_COMMAND} logs
exit 1
fi

sleep 50 # Keep the original 60-second wait, adjusted for the 10-second check above
${DOCKER_COMPOSE_COMMAND} logs openim-server
${DOCKER_COMPOSE_COMMAND} ps

popd
popd

0 comments on commit d594d6f

Please sign in to comment.