Files
open-im-server/config/config.yaml
T

472 lines
11 KiB
YAML
Raw Normal View History

2021-05-26 18:47:52 +08:00
# The class cannot be named by Pascal or camel case.
# If it is not used, the corresponding structure will not be set,
# and it will not be read naturally.
2021-12-10 17:51:19 +08:00
serverversion: 1.0.3
2021-05-26 18:47:52 +08:00
#---------------Infrastructure configuration---------------------#
etcd:
etcdSchema: openIM
2021-05-26 20:21:33 +08:00
etcdAddr: [ 127.0.0.1:2379 ]
2021-11-29 11:25:57 +08:00
2021-05-26 18:47:52 +08:00
mysql:
2022-02-15 18:29:38 +08:00
dbMysqlAddress: [ 127.0.0.1:13306 ]
2021-05-31 10:03:57 +08:00
dbMysqlUserName: root
2021-07-15 10:48:01 +08:00
dbMysqlPassword: openIM
2022-02-15 14:11:20 +08:00
dbMysqlDatabaseName: openIM
2021-05-26 18:47:52 +08:00
dbTableName: eMsg
dbMsgTableNum: 1
dbMaxOpenConns: 20
dbMaxIdleConns: 10
dbMaxLifeTime: 120
mongo:
2022-02-15 18:29:38 +08:00
dbAddress: [ 127.0.0.1:37017 ]
2021-05-26 18:47:52 +08:00
dbDirect: false
dbTimeout: 10
2021-06-28 16:10:07 +08:00
dbDatabase: openIM
2021-05-26 18:47:52 +08:00
dbSource: admin
2021-11-25 21:06:07 +08:00
dbUserName:
dbPassword:
2021-05-26 18:47:52 +08:00
dbMaxPoolSize: 20
dbRetainChatRecords: 7
redis:
2022-02-15 18:29:38 +08:00
dbAddress: 127.0.0.1:16379
2021-05-26 18:47:52 +08:00
dbMaxIdle: 128
dbMaxActive: 0
dbIdleTimeout: 120
2021-07-15 10:48:01 +08:00
dbPassWord: openIM
2021-05-26 18:47:52 +08:00
kafka:
ws2mschat:
2021-05-26 20:21:33 +08:00
addr: [ 127.0.0.1:9092 ]
2021-05-26 18:47:52 +08:00
topic: "ws2ms_chat"
ms2pschat:
2021-05-26 20:21:33 +08:00
addr: [ 127.0.0.1:9092 ]
2021-05-26 18:47:52 +08:00
topic: "ms2ps_chat"
consumergroupid:
msgToMongo: mongo
msgToMySql: mysql
msgToPush: push
#---------------Internal service configuration---------------------#
# The service ip default is empty,
# automatically obtain the machine's valid network card ip as the service ip,
# otherwise the configuration ip is preferred
2021-11-25 13:57:11 +08:00
serverip: 0.0.0.0
2021-05-26 18:47:52 +08:00
# endpoints 内部组件间访问的端点host名称,访问时,可以内部直接访问 host:port 来访问
endpoints:
api: openim_api
2022-02-16 11:06:35 +08:00
cmsapi: openim_cms_api
push: openim_push
msg_gateway: openim_msg_gateway
rpc_auth: openim_rpc_auth
rpc_friend: openim_rpc_friend
rpc_group: openim_rpc_group
rpc_msg: openim_rpc_msg
rpc_user: openim_rpc_user
2022-02-16 11:06:35 +08:00
rpc_statistic: openim_rpc_statistic
rpc_admin_cms: openim_rpc_admin_cms
rpc_message_cms: openim_rpc_admin_cms
2021-11-25 13:57:11 +08:00
api:
2021-05-26 18:47:52 +08:00
openImApiPort: [ 10000 ]
2022-01-24 01:40:49 +08:00
cmsapi:
2022-02-16 14:11:47 +08:00
openImCmsApiPort: [ 8000 ]
2021-09-27 21:03:36 +08:00
sdk:
2021-10-08 17:50:09 +08:00
openImSdkWsPort: [ 30000 ]
2021-05-26 18:47:52 +08:00
credential:
tencent:
appID: 1302656840
region: ap-chengdu
bucket: echat-1302656840
secretID: AKIDGNYVChzIQinu7QEgtNp0hnNgqcV8vZTC
secretKey: kz15vW83qM6dBUWIq681eBZA0c0vlIbe
rpcport:
2021-09-13 15:48:19 +08:00
openImUserPort: [ 10100 ]
openImFriendPort: [ 10200 ]
2022-01-18 09:25:41 +08:00
openImOfflineMessagePort: [ 10300 ]
2021-05-26 18:47:52 +08:00
openImOnlineRelayPort: [ 10400 ]
2022-01-18 09:25:41 +08:00
openImGroupPort: [ 10500 ]
2021-09-13 15:48:19 +08:00
openImAuthPort: [ 10600 ]
2021-05-26 18:47:52 +08:00
openImPushPort: [ 10700 ]
2022-02-16 12:23:08 +08:00
openImStatisticsPort: [ 10800 ]
2022-02-16 14:11:47 +08:00
openImMessageCmsPort: [ 10900 ]
2022-02-16 12:23:08 +08:00
openImAdminCmsPort: [ 11000 ]
2022-02-16 11:13:13 +08:00
c2c:
2021-12-02 21:35:01 +08:00
callbackBeforeSendMsg:
switch: false
timeoutStrategy: 1 #1:send
callbackAfterSendMsg:
switch: false
state:
stateChange:
switch: false
2021-05-26 18:47:52 +08:00
rpcregistername:
2022-02-09 16:22:58 +08:00
openImUserName: User
2021-05-26 18:47:52 +08:00
openImFriendName: Friend
openImOfflineMessageName: OfflineMessage
openImPushName: Push
openImOnlineMessageRelayName: OnlineMessageRelay
openImGroupName: Group
2021-10-11 18:18:50 +08:00
openImAuthName: Auth
2022-02-07 08:44:21 +08:00
OpenImStatisticsName: Statistics
2022-02-09 16:22:58 +08:00
OpenImMessageCMSName: MessageCMS
2022-02-12 17:13:31 +08:00
openImAdminCMSName: AdminCMS
2021-05-26 18:47:52 +08:00
log:
storageLocation: ../logs/
2021-10-11 18:18:50 +08:00
rotationTime: 24
remainRotationCount: 5
remainLogLevel: 6
2021-05-26 18:47:52 +08:00
elasticSearchSwitch: false
2021-07-15 10:48:01 +08:00
elasticSearchAddr: [ 127.0.0.1:9201 ]
2021-05-26 18:47:52 +08:00
elasticSearchUser: ""
elasticSearchPassword: ""
modulename:
longConnSvrName: msg_gateway
msgTransferName: msg_transfer
pushName: push
longconnsvr:
2021-10-08 17:50:09 +08:00
openImWsPort: [ 17778 ]
2021-05-26 18:47:52 +08:00
websocketMaxConnNum: 10000
websocketMaxMsgLen: 4096
websocketTimeOut: 10
push:
tpns:
ios:
accessID: 1600018281
secretKey: 3cd68a77a95b89e5089a1aca523f318f
android:
accessID: 111
secretKey: 111
2021-10-29 15:08:43 +08:00
jpns:
appKey: cf47465a368f24c659608e7e
masterSecret: 02204efe3f3832947a236ee5
2021-10-29 15:08:43 +08:00
pushUrl: "https://api.jpush.cn/v3/push"
2021-11-12 17:25:17 +08:00
pushIntent: "intent:#Intent;component=io.openim.app.enterprisechat/io.openim.app.enterprisechat.MainActivity;end"
2021-09-26 14:26:45 +08:00
manager:
2022-02-12 17:13:31 +08:00
appManagerUid: [ "openIM123456","openIM654321", "openIM333", "openIMAdmin"]
2022-02-16 11:06:35 +08:00
secrets: [ "openIM1","openIM2", "openIM333", "openIMAdmin"]
2021-05-26 18:47:52 +08:00
secret: tuoyun
2021-11-25 14:12:52 +08:00
multiloginpolicy: 1
2021-05-26 18:47:52 +08:00
#token config
tokenpolicy:
accessSecret: "open_im_server"
# Token effective time day as a unit
accessExpire: 7
2021-05-31 10:03:57 +08:00
messagecallback:
callbackUrl: "http://www.xxx.com/msg/judge"
#TimeOut use second as unit
2021-11-23 09:57:09 +08:00
callbackTimeOut: 10
2022-02-18 15:16:33 +08:00
messagejudge:
isJudgeFriend: true
2022-02-08 19:18:07 +08:00
# c2c:
# callbackBeforeSendMsg:
# switch: false
# timeoutStrategy: 1 #1:send
# callbackAfterSendMsg:
# switch: false
# state:
# stateChange:
# switch: false
2021-12-01 12:16:02 +08:00
2022-02-08 19:22:15 +08:00
iospush:
2021-12-20 16:29:24 +08:00
pushSound: "xxx"
2021-12-21 21:40:50 +08:00
badgeCount: true
2021-12-20 16:29:24 +08:00
notification:
groupCreated:
conversation:
2022-02-08 15:19:31 +08:00
reliabilityLevel: 3
2021-12-21 21:40:50 +08:00
unreadCount: true
2021-12-20 16:29:24 +08:00
offlinePush:
switch: true
2022-01-14 13:44:46 +08:00
title: "create group title" # xx create the group
2021-12-20 16:29:24 +08:00
desc: "create group desc"
ext: "create group ext"
defaultTips:
tips: "create the group" # xx create the group
2022-01-18 09:25:41 +08:00
groupInfoSet:
conversation:
2022-02-08 15:19:31 +08:00
reliabilityLevel: 3
unreadCount: true
2022-01-18 09:25:41 +08:00
offlinePush:
switch: false
2022-02-08 15:19:31 +08:00
title: "groupInfoSet title"
desc: "groupInfoSet desc"
ext: "groupInfoSet ext"
2022-01-18 09:25:41 +08:00
defaultTips:
2022-02-08 15:19:31 +08:00
tips: "modified the group profile" # group info changed by xx
2022-01-18 09:25:41 +08:00
joinGroupApplication:
conversation:
2022-02-08 15:19:31 +08:00
reliabilityLevel: 2
2022-01-18 09:25:41 +08:00
unreadCount: false
offlinePush:
switch: false
2022-02-08 15:19:31 +08:00
title: "joinGroupApplication title"
desc: "joinGroupApplication desc"
ext: "joinGroupApplication ext"
2022-01-18 09:25:41 +08:00
defaultTips:
2022-02-08 15:19:31 +08:00
tips: "apply to join the group" # group info changed by xx
2022-01-18 09:25:41 +08:00
memberQuit:
conversation:
2022-02-08 15:19:31 +08:00
reliabilityLevel: 3
unreadCount: true
2022-01-18 09:25:41 +08:00
offlinePush:
switch: false
2022-02-08 15:19:31 +08:00
title: "memberQuit title"
desc: "memberQuit desc"
ext: "memberQuit ext"
2022-01-18 09:25:41 +08:00
defaultTips:
2022-02-08 15:19:31 +08:00
tips: "quit group chat" # group info changed by xx
2022-01-18 09:25:41 +08:00
groupApplicationAccepted:
conversation:
2022-02-10 12:28:06 +08:00
reliabilityLevel: 2
2022-02-08 15:19:31 +08:00
unreadCount: true
2022-01-18 09:25:41 +08:00
offlinePush:
switch: false
2022-02-08 15:19:31 +08:00
title: "groupApplicationAccepted title"
desc: "groupApplicationAccepted desc"
ext: "groupApplicationAccepted ext"
2022-01-18 09:25:41 +08:00
defaultTips:
2022-02-08 15:19:31 +08:00
tips: "was allowed to join the group" # group info changed by xx
2022-01-18 09:25:41 +08:00
groupApplicationRejected:
conversation:
2022-02-08 15:19:31 +08:00
reliabilityLevel: 2
2022-01-18 09:25:41 +08:00
unreadCount: false
offlinePush:
switch: false
2022-02-08 15:19:31 +08:00
title: " title"
desc: " desc"
ext: " ext"
2022-01-18 09:25:41 +08:00
defaultTips:
2022-02-08 15:19:31 +08:00
tips: "was rejected into the group" # group info changed by xx
2022-01-18 09:25:41 +08:00
groupOwnerTransferred:
conversation:
2022-02-08 15:19:31 +08:00
reliabilityLevel: 3
unreadCount: true
2022-01-18 09:25:41 +08:00
offlinePush:
switch: false
2022-02-08 15:19:31 +08:00
title: "groupOwnerTransferred title"
desc: "groupOwnerTransferred desc"
ext: "groupOwnerTransferred ext"
2022-01-18 09:25:41 +08:00
defaultTips:
2022-02-08 15:19:31 +08:00
tips: "become a new group owner" # group info changed by xx
2022-01-14 13:44:46 +08:00
2022-01-18 09:25:41 +08:00
memberKicked:
2021-12-20 16:29:24 +08:00
conversation:
2022-02-08 15:19:31 +08:00
reliabilityLevel: 3
unreadCount: true
2021-12-20 16:29:24 +08:00
offlinePush:
2022-01-14 13:44:46 +08:00
switch: false
2022-02-08 15:19:31 +08:00
title: "memberKicked title"
desc: "memberKicked desc"
ext: "memberKicked ext"
2021-12-20 16:29:24 +08:00
defaultTips:
2022-02-08 15:19:31 +08:00
tips: "was kicked out of the group" # group info changed by xx
2022-01-14 13:44:46 +08:00
2022-01-18 09:25:41 +08:00
memberInvited:
conversation:
2022-02-08 15:19:31 +08:00
reliabilityLevel: 3
unreadCount: true
2022-01-18 09:25:41 +08:00
offlinePush:
switch: false
2022-02-08 15:19:31 +08:00
title: "memberInvited title"
desc: "memberInvited desc"
ext: "memberInvited ext"
2022-01-18 09:25:41 +08:00
defaultTips:
2022-02-08 15:19:31 +08:00
tips: "was invited into the group" # group info changed by xx
2022-01-18 09:25:41 +08:00
memberEnter:
conversation:
2022-02-08 15:19:31 +08:00
reliabilityLevel: 3
unreadCount: true
2022-01-18 09:25:41 +08:00
offlinePush:
switch: false
2022-02-08 15:19:31 +08:00
title: "memberEnter title"
desc: "memberEnter desc"
ext: "memberEnter ext"
2022-01-18 09:25:41 +08:00
defaultTips:
2022-02-08 15:19:31 +08:00
tips: "entered the group" # group info changed by xx
2021-12-20 16:29:24 +08:00
2022-01-18 09:25:41 +08:00
#############################friend#################################
2021-12-20 16:29:24 +08:00
2022-01-18 09:25:41 +08:00
friendApplicationAdded:
2022-01-16 12:25:41 +08:00
conversation:
reliabilityLevel: 2
unreadCount: false
offlinePush:
switch: true
title: "Somebody applies to add you as a friend"
desc: "Somebody applies to add you as a friend"
ext: "Somebody applies to add you as a friend"
defaultTips:
tips: "I applies to add you as a friend" #
2022-01-18 09:25:41 +08:00
friendApplicationApproved:
2022-01-16 12:25:41 +08:00
conversation:
reliabilityLevel: 2
unreadCount: false
offlinePush:
switch: true
title: "Someone applies to add your friend application"
desc: "Someone applies to add your friend application"
ext: "Someone applies to add your friend application"
defaultTips:
tips: "I applies to add your friend application" #
2022-01-18 09:25:41 +08:00
friendApplicationRejected:
2022-01-16 12:25:41 +08:00
conversation:
reliabilityLevel: 2
unreadCount: false
offlinePush:
switch: true
title: "Someone rejected your friend application"
desc: "Someone rejected your friend application"
ext: "Someone rejected your friend application"
defaultTips:
tips: "I rejected your friend application" #
2022-01-18 09:25:41 +08:00
friendAdded:
2022-01-16 12:25:41 +08:00
conversation:
reliabilityLevel: 3
unreadCount: true
offlinePush:
switch: true
title: "We have become friends"
desc: "We have become friends"
ext: "We have become friends"
defaultTips:
tips: "We have become friends" #
2022-01-18 09:25:41 +08:00
friendDeleted:
2022-01-16 12:25:41 +08:00
conversation:
reliabilityLevel: 2
unreadCount: false
offlinePush:
switch: true
title: "Deleted a friend"
desc: "Deleted a friend"
ext: "Deleted a friend"
defaultTips:
tips: "Deleted a friend" #
2022-01-18 09:40:08 +08:00
friendRemarkSet:
2022-01-16 12:25:41 +08:00
conversation:
reliabilityLevel: 2
unreadCount: false
offlinePush:
switch: true
title: "Your friend's profile has been changed"
desc: "Your friend's profile has been changed"
ext: "Your friend's profile has been changed"
defaultTips:
tips: "Your friend's profile has been changed" #
2022-01-18 09:25:41 +08:00
blackAdded:
2022-01-16 12:25:41 +08:00
conversation:
reliabilityLevel: 2
unreadCount: false
offlinePush:
switch: true
title: "Blocked a user"
desc: "Blocked a user"
ext: "Blocked a user"
defaultTips:
tips: "Blocked a user" #
2022-01-18 09:25:41 +08:00
blackDeleted:
conversation:
reliabilityLevel: 2
unreadCount: false
offlinePush:
switch: true
title: "Remove a blocked user"
desc: "Remove a blocked user"
ext: "Remove a blocked user"
defaultTips:
tips: "Remove a blocked user"
#####################user#########################
userInfoUpdated:
2022-01-16 12:25:41 +08:00
conversation:
reliabilityLevel: 2
unreadCount: false
offlinePush:
switch: true
title: "Remove a blocked user"
desc: "Remove a blocked user"
ext: "Remove a blocked user"
defaultTips:
tips: "Remove a blocked user"
2022-02-15 14:11:20 +08:00
#####################conversation#########################
conversationOptUpdate:
conversation:
reliabilityLevel: 2
unreadCount: false
offlinePush:
switch: true
title: "conversation opt update"
desc: "conversation opt update"
ext: "conversation opt update"
defaultTips:
tips: "conversation opt update"
2022-01-16 12:25:41 +08:00
2021-12-01 12:16:02 +08:00
#---------------demo configuration---------------------#
#The following configuration items are applied to openIM Demo configuration
demoswitch: true
demo:
openImDemoPort: [ 42233 ]
alismsverify:
2021-12-01 14:28:47 +08:00
accessKeyId: LTAI5tJPkn4HuuePdiLdGqe71
accessKeySecret: 4n9OJ7ZCVN1U6KeHDAtOyNeVZcjOuV1
2021-12-01 12:16:02 +08:00
signName: OpenIM Corporation
2021-12-01 14:28:47 +08:00
verificationCodeTemplateCode: SMS_2268101641
2021-12-01 12:16:02 +08:00
superCode: 666666
2022-02-11 16:25:28 +08:00
# second
2022-02-11 17:51:36 +08:00
codeTTL: 60
2021-12-01 12:16:02 +08:00
mail:
2021-12-01 14:28:47 +08:00
title: "openIM"
2022-02-11 16:25:28 +08:00
senderMail: "1765567899@qq.com"
senderAuthorizationCode: "1gxyausfoevlzbfag"
smtpAddr: "smtp.qq.com"
smtpPort: 25
2021-12-01 12:16:02 +08:00