mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-10-26 13:12:12 +08:00
script
This commit is contained in:
parent
6dbc7aeb64
commit
efc08efa34
@ -1,33 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
echo "docker-compose ps....................."
|
||||||
|
docker-compose ps
|
||||||
|
|
||||||
source ./style_info.cfg
|
sleep 10
|
||||||
|
|
||||||
docker_compose_components=(
|
echo "check OpenIM.........................."
|
||||||
etcd
|
./check_all.sh
|
||||||
mongo
|
|
||||||
mysql
|
|
||||||
open_im_server
|
|
||||||
redis
|
|
||||||
kafka
|
|
||||||
zookeeper
|
|
||||||
)
|
|
||||||
|
|
||||||
component_server_count=0
|
|
||||||
|
|
||||||
for ((i = 0; i < ${#docker_compose_components[*]}; i++)); do
|
|
||||||
component_server="docker-compose ps|grep -w ${docker_compose_components[$i]}|grep Up"
|
|
||||||
count="${component_server}|wc -l"
|
|
||||||
|
|
||||||
if [ $(eval ${count}) -gt 0 ]; then
|
|
||||||
echo -e "${SKY_BLUE_PREFIX}docker-compose ${docker_compose_components[$i]} is Up!${COLOR_SUFFIX}"
|
|
||||||
let component_server_count+=1
|
|
||||||
else
|
|
||||||
echo -e "${RED_PREFIX} ${docker_compose_components[$i]} start failed!${COLOR_SUFFIX}"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ ${component_server_count} -eq 7 ]; then
|
|
||||||
echo -e "${YELLOW_PREFIX}\ndocker-compose all services is Up!${COLOR_SUFFIX}"
|
|
||||||
else
|
|
||||||
echo -e "${RED_PREFIX}\nsome docker-compose services start failed,please check red logs on console ${COLOR_SUFFIX}"
|
|
||||||
fi
|
|
||||||
|
|||||||
@ -1,24 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#fixme This script is the total startup script
|
|
||||||
#fixme The full name of the shell script that needs to be started is placed in the need_to_start_server_shell array
|
|
||||||
|
|
||||||
#fixme Put the shell script name here
|
|
||||||
need_to_start_server_shell=(
|
|
||||||
start_rpc_service.sh
|
|
||||||
msg_gateway_start.sh
|
|
||||||
push_start.sh
|
|
||||||
msg_transfer_start.sh
|
|
||||||
sdk_svr_start.sh
|
|
||||||
timer_start.sh
|
|
||||||
)
|
|
||||||
|
|
||||||
#fixme The 10 second delay to start the project is for the docker-compose one-click to start openIM when the infrastructure dependencies are not started
|
#fixme The 10 second delay to start the project is for the docker-compose one-click to start openIM when the infrastructure dependencies are not started
|
||||||
sleep 10
|
sleep 10
|
||||||
|
|
||||||
for i in ${need_to_start_server_shell[*]}; do
|
./start_all.sh
|
||||||
chmod +x $i
|
|
||||||
./$i
|
|
||||||
done
|
|
||||||
|
|
||||||
sleep 15
|
sleep 15
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user