add sdk svr to docker script

pull/8/head
Gordon 3 years ago
parent a1e9332606
commit c48245fc9b

@ -60,7 +60,7 @@ serverip:
api:
openImApiPort: [ 10000 ]
sdk:
sdkWsPort: [ 30000 ]
openImSdkWsPort: [ 30000 ]
credential:
tencent:
@ -105,7 +105,7 @@ modulename:
pushName: push
longconnsvr:
websocketPort: [ 17778 ]
openImWsPort: [ 17778 ]
websocketMaxConnNum: 10000
websocketMaxMsgLen: 4096
websocketTimeOut: 10

@ -4,9 +4,7 @@ source ./style_info.cfg
source ./path_info.cfg
source ./function.sh
service_port_name=(
#api port name
openImApiPort
#rpc port name
openImUserPort
openImFriendPort
openImOfflineMessagePort
@ -14,8 +12,8 @@ service_port_name=(
openImGroupPort
openImAuthPort
openImPushPort
websocketPort
sdkWsPort
openImWsPort
openImSdkWsPort
)
for i in ${service_port_name[*]};do
list=$(cat $config_path | grep -w ${i} | awk -F '[:]' '{print $NF}')

@ -8,6 +8,7 @@ need_to_start_server_shell=(
msg_gateway_start.sh
push_start.sh
msg_transfer_start.sh
sdk_svr_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

@ -4,7 +4,7 @@ source ./style_info.cfg
source ./path_info.cfg
source ./function.sh
list1=$(cat $config_path | grep openImOnlineRelayPort | awk -F '[:]' '{print $NF}')
list2=$(cat $config_path | grep websocketPort | awk -F '[:]' '{print $NF}')
list2=$(cat $config_path | grep openImWsPort | awk -F '[:]' '{print $NF}')
list_to_string $list1
rpc_ports=($ports_array)
list_to_string $list2
@ -39,7 +39,7 @@ if [ $check -ge 1 ]; then
ports=$(netstat -netulp | grep -w ${i} | awk '{print $4}' | awk -F '[:]' '{print $NF}')
allPorts=${allPorts}"$ports "
done
echo -e ${SKY_BLUE_PREFIX}"SERVICE START SUCCESS !!!"${COLOR_SUFFIX}
echo -e ${SKY_BLUE_PREFIX}"SERVICE START SUCCESS"${COLOR_SUFFIX}
echo -e ${SKY_BLUE_PREFIX}"SERVICE_NAME: "${COLOR_SUFFIX}${YELLOW_PREFIX}${msg_gateway_name}${COLOR_SUFFIX}
echo -e ${SKY_BLUE_PREFIX}"PID: "${COLOR_SUFFIX}${YELLOW_PREFIX}${allNewPid}${COLOR_SUFFIX}
echo -e ${SKY_BLUE_PREFIX}"LISTENING_PORT: "${COLOR_SUFFIX}${YELLOW_PREFIX}${allPorts}${COLOR_SUFFIX}

@ -29,7 +29,7 @@ for i in $ports ;
do
allPorts=${allPorts}"$i "
done
echo -e ${SKY_BLUE_PREFIX}"SERVICE START SUCCESS !!!"${COLOR_SUFFIX}
echo -e ${SKY_BLUE_PREFIX}"SERVICE START SUCCESS "${COLOR_SUFFIX}
echo -e ${SKY_BLUE_PREFIX}"SERVICE_NAME: "${COLOR_SUFFIX}${YELLOW_PREFIX}${msg_transfer_name}${COLOR_SUFFIX}
echo -e ${SKY_BLUE_PREFIX}"PID: "${COLOR_SUFFIX}${YELLOW_PREFIX}${newPid}${COLOR_SUFFIX}
echo -e ${SKY_BLUE_PREFIX}"LISTENING_PORT: "${COLOR_SUFFIX}${YELLOW_PREFIX}${allPorts}${COLOR_SUFFIX}

@ -36,7 +36,7 @@ if [ $check -eq 1 ]; then
for i in $ports; do
allPorts=${allPorts}"$i "
done
echo -e ${SKY_BLUE_PREFIX}"SERVICE START SUCCESS !!!"${COLOR_SUFFIX}
echo -e ${SKY_BLUE_PREFIX}"SERVICE START SUCCESS "${COLOR_SUFFIX}
echo -e ${SKY_BLUE_PREFIX}"SERVICE_NAME: "${COLOR_SUFFIX}${YELLOW_PREFIX}${push_name}${COLOR_SUFFIX}
echo -e ${SKY_BLUE_PREFIX}"PID: "${COLOR_SUFFIX}${YELLOW_PREFIX}${newPid}${COLOR_SUFFIX}
echo -e ${SKY_BLUE_PREFIX}"LISTENING_PORT: "${COLOR_SUFFIX}${YELLOW_PREFIX}${allPorts}${COLOR_SUFFIX}

@ -4,8 +4,8 @@ source ./style_info.cfg
source ./path_info.cfg
source ./function.sh
list1=$(cat $config_path | grep openImApiPort | awk -F '[:]' '{print $NF}')
list2=$(cat $config_path | grep websocketPort | awk -F '[:]' '{print $NF}')
list3=$(cat $config_path | grep sdkWsPort | awk -F '[:]' '{print $NF}')
list2=$(cat $config_path | grep openImWsPort | awk -F '[:]' '{print $NF}')
list3=$(cat $config_path | grep openImSdkWsPort | awk -F '[:]' '{print $NF}')
list_to_string $list1
api_ports=($ports_array)
list_to_string $list2

@ -14,7 +14,7 @@ type config struct {
GinPort []int `yaml:"openImApiPort"`
}
Sdk struct {
WsPort []int `yaml:"sdkWsPort"`
WsPort []int `yaml:"openImSdkWsPort"`
}
Credential struct {
Tencent struct {
@ -92,7 +92,7 @@ type config struct {
PushName string `yaml:"pushName"`
}
LongConnSvr struct {
WebsocketPort []int `yaml:"websocketPort"`
WebsocketPort []int `yaml:"openImWsPort"`
WebsocketMaxConnNum int `yaml:"websocketMaxConnNum"`
WebsocketMaxMsgLen int `yaml:"websocketMaxMsgLen"`
WebsocketTimeOut int `yaml:"websocketTimeOut"`

@ -110,6 +110,10 @@ func (s *friendServer) ImportFriend(ctx context.Context, req *pbFriend.ImportFri
SessionType: constant.SingleChatType,
OperationID: req.OperationID,
})
} else {
resp.CommonResp.ErrorMsg = "some uid establish failed"
resp.CommonResp.ErrorCode = 408
resp.FailedUidList = append(resp.FailedUidList, v)
}
}
}

@ -81,7 +81,7 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite
log.Error(claims.UID, req.OperationID, "FindUserByUID failed, err: ", err.Error())
return &pbGroup.InviteUserToGroupResp{ErrorCode: config.ErrParam.ErrCode, ErrorMsg: config.ErrParam.ErrMsg}, nil
}*/
var nicknameList string
for _, v := range req.UidList {
var resultNode pbGroup.Id2Result
resultNode.UId = v
@ -113,7 +113,7 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite
if err != nil {
log.Error("", "", "add mongo group member failed, db.DB.AddGroupMember fail [err: %s]", err.Error())
}
nicknameList = nicknameList + toUserInfo.Name + " "
resp.Id2Result = append(resp.Id2Result, &resultNode)
}
resp.ErrorCode = 0
@ -121,12 +121,13 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite
//if claims.UID == config.Config.AppManagerUid
if utils.IsContain(claims.UID, config.Config.Manager.AppManagerUid) {
m, _ := imdb.FindUserByUID(claims.UID)
var iu inviteUserToGroupReq
iu.GroupID = req.GroupID
iu.OperationID = req.OperationID
iu.Reason = req.Reason
iu.UidList = req.UidList
n := content_struct.NotificationContent{1, req.GroupID, iu.ContentToString()}
n := content_struct.NotificationContent{1, nicknameList + " invited into the group chat by " + m.Name, iu.ContentToString()}
logic.SendMsgByWS(&pbChat.WSToMsgSvrChatMsg{
SendID: claims.UID,
RecvID: req.GroupID,

Loading…
Cancel
Save