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

224 lines
5.1 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:
2021-11-23 09:57:09 +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
2021-05-31 10:03:57 +08:00
dbMysqlDatabaseName: openIM
2021-05-26 18:47:52 +08:00
dbTableName: eMsg
dbMsgTableNum: 1
dbMaxOpenConns: 20
dbMaxIdleConns: 10
dbMaxLifeTime: 120
mongo:
2021-11-23 09:57:09 +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:
2021-11-23 09:57:09 +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
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
2021-11-25 13:57:11 +08:00
api:
2021-05-26 18:47:52 +08:00
openImApiPort: [ 10000 ]
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 ]
openImOfflineMessagePort: [ 10300]
2021-05-26 18:47:52 +08:00
openImOnlineRelayPort: [ 10400 ]
2021-09-13 15:48:19 +08:00
openImGroupPort: [ 10500 ]
openImAuthPort: [ 10600 ]
2021-05-26 18:47:52 +08:00
openImPushPort: [ 10700 ]
2021-12-02 21:35:01 +08:00
c2c:
callbackBeforeSendMsg:
switch: false
timeoutStrategy: 1 #1:send
callbackAfterSendMsg:
switch: false
state:
stateChange:
switch: false
2021-05-26 18:47:52 +08:00
rpcregistername:
openImUserName: User
openImFriendName: Friend
openImOfflineMessageName: OfflineMessage
openImPushName: Push
openImOnlineMessageRelayName: OnlineMessageRelay
openImGroupName: Group
2021-10-11 18:18:50 +08:00
openImAuthName: Auth
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:
appManagerUid: ["openIM123456","openIM654321"]
secrets: ["openIM1","openIM2"]
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
2021-12-02 21:35:01 +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
2021-12-20 16:29:24 +08:00
iOSPush:
pushSound: "xxx"
2021-12-21 21:40:50 +08:00
badgeCount: true
2021-12-20 16:29:24 +08:00
notification:
groupCreated:
conversation:
2021-12-21 21:40:50 +08:00
conversationChanged: true
unreadCount: true
2021-12-20 16:29:24 +08:00
offlinePush:
switch: true
title: "create group title"
desc: "create group desc"
ext: "create group ext"
defaultTips:
tips: "create the group" # xx create the group
groupInfoChanged:
conversation:
2021-12-21 21:40:50 +08:00
conversationChanged: true
unreadCount: true
2021-12-20 16:29:24 +08:00
offlinePush:
switch: true
title: "group info changed title"
desc: "group info changed desc"
ext: "group info changed ext"
defaultTips:
tips: "group info changed by" # group info changed by xx
conversationChanged: 0
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
mail:
2021-12-01 14:28:47 +08:00
title: "openIM"
senderMail: "1765567899@qq.com"
senderAuthorizationCode: "1gxyausfoevlzbfag"
2021-12-01 12:16:02 +08:00
smtpAddr: "smtp.qq.com"
smtpPort: 25