Skip to content

Commit

Permalink
build: release images v1.1.1-beta.1
Browse files Browse the repository at this point in the history
Signed-off-by: Xinwei Xiong(cubxxw-openim) <[email protected]>
  • Loading branch information
cubxxw committed Aug 4, 2023
1 parent a3f9676 commit 2da3758
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 12 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,6 @@ COPY --from=builder /openim/openim-chat/_output/bin/platforms /openim/openim-cha
COPY --from=builder ${OPENIM_CHAT_CMDDIR} /openim/openim-chat/scripts
COPY --from=builder ${OPENIM_CHAT_CONFIG_NAME} /openim/openim-chat/config/config.yaml

VOLUME ["/openim/openim-chat/logs","/openim/openim-chat/config","/openim/openim-chat/scripts"]

CMD ${OPENIM_CHAT_CMDDIR}/docker_start_all.sh
43 changes: 31 additions & 12 deletions scripts/check_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,37 @@ service_port_name=(
openImChatPort
)

switch=$(cat $config_path | grep demoswitch |awk -F '[:]' '{print $NF}')
switch=$(cat $config_path | grep demoswitch | awk -F '[:]' '{print $NF}')
for i in ${service_port_name[*]}; do
list=$(cat $config_path | grep -w ${i} | awk -F '[:]' '{print $NF}')
list_to_string $list
for j in ${ports_array}; do
port=$(ss -tunlp| grep open_im | awk '{print $5}' | grep -w ${j} | awk -F '[:]' '{print $NF}')
if [[ ${port} -ne ${j} ]]; then
echo -e ${YELLOW_PREFIX}${i}${COLOR_SUFFIX}${RED_PREFIX}" service does not start normally,not initiated port is "${COLOR_SUFFIX}${YELLOW_PREFIX}${j}${COLOR_SUFFIX}
echo -e ${RED_PREFIX}"please check ${OPENIM_ROOT}/logs/openIM.log "${COLOR_SUFFIX}
case $i in
"openImChatApiPort")
new_service_name="chat-api"
new_service_port="10008"
;;
"openImAdminApiPort")
new_service_name="admin-rpc"
new_service_port="30200"
;;
"openImAdminPort")
new_service_name="chat-rpc"
new_service_port="30300"
;;
"openImChatPort")
new_service_name="admin-api"
new_service_port="10009"
;;
*)
echo "Invalid service name: $i"
exit -1
else
echo -e ${j}${GREEN_PREFIX}" port has been listening,belongs service is "${i}${COLOR_SUFFIX}
fi
done
;;
esac

port=$(ss -tunlp | grep "$new_service_name" | awk '{print $5}' | awk -F '[:]' '{print $NF}')
if [[ "$port" != "$new_service_port" ]]; then
echo -e "${YELLOW_PREFIX}${i}${COLOR_SUFFIX}${RED_PREFIX} service does not start normally, not initiated port is ${COLOR_SUFFIX}${YELLOW_PREFIX}${new_service_port}${COLOR_SUFFIX}"
echo -e "${RED_PREFIX}please check ${SCRIPTS_ROOT}/../logs/openIM.log ${COLOR_SUFFIX}"
exit -1
else
echo -e "${new_service_port}${GREEN_PREFIX} port has been listening, belongs service is ${i}${COLOR_SUFFIX}"
fi
done

0 comments on commit 2da3758

Please sign in to comment.