You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Open-IM-Server/config/config.yaml

474 lines
13 KiB

4 years ago
# 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.
3 years ago
serverversion: 3.0.0
4 years ago
#---------------Infrastructure configuration---------------------#
etcd:
3 years ago
etcdSchema: openIM #默认即可
etcdAddr: [ 127.0.0.1:2379 ] #单机部署时,默认即可
3 years ago
4 years ago
mysql:
3 years ago
dbMysqlAddress: [ 127.0.0.1:13306 ] #mysql地址 目前仅支持单机,默认即可
dbMysqlUserName: root #mysql用户名建议修改
dbMysqlPassword: openIM # mysql密码建议修改
dbMysqlDatabaseName: openIM #默认即可
dbTableName: eMsg #默认即可
4 years ago
dbMsgTableNum: 1
dbMaxOpenConns: 20
dbMaxIdleConns: 10
dbMaxLifeTime: 120
mongo:
3 years ago
dbAddress: [ 127.0.0.1:37017 ] #redis地址 目前仅支持单机,默认即可
4 years ago
dbDirect: false
dbTimeout: 10
3 years ago
dbDatabase: openIM #mongo db 默认即可
4 years ago
dbSource: admin
3 years ago
dbUserName: #mongo用户名建议修改
dbPassword: #mongo密码建议修改
4 years ago
dbMaxPoolSize: 20
3 years ago
dbRetainChatRecords: 3650 #mongo保存离线消息时间
4 years ago
redis:
3 years ago
dbAddress: 127.0.0.1:16379 #redis地址 目前仅支持单机,默认即可
4 years ago
dbMaxIdle: 128
dbMaxActive: 0
dbIdleTimeout: 120
3 years ago
dbPassWord: openIM #redis密码 建议修改
4 years ago
kafka:
ws2mschat:
3 years ago
addr: [ 127.0.0.1:9092 ] #kafka配置默认即可
4 years ago
topic: "ws2ms_chat"
ms2pschat:
3 years ago
addr: [ 127.0.0.1:9092 ] #kafka配置默认即可
4 years ago
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
3 years ago
#如果是单机模式用0.0.0.0或者不填,默认即可
3 years ago
serverip: 0.0.0.0
4 years ago
# endpoints 内部组件间访问的端点host名称访问时可以内部直接访问 host:port 来访问
endpoints:
api: openim_api
3 years ago
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
3 years ago
rpc_statistic: openim_rpc_statistic
rpc_admin_cms: openim_rpc_admin_cms
rpc_message_cms: openim_rpc_admin_cms
3 years ago
api:
3 years ago
openImApiPort: [ 10000 ] #api服务端口默认即可注意开放此端口或做nginx转发
3 years ago
cmsapi:
3 years ago
openImCmsApiPort: [ 8000 ] #管理后台api服务端口默认即可注意开放此端口或做nginx转发
sdk:
3 years ago
openImSdkWsPort: [ 30000 ] #jssdk服务端口默认即可项目中使用jssdk才需开放此端口或做nginx转发
4 years ago
3 years ago
credential: #腾讯cos发送图片、视频、文件时需要请自行申请后替换必须修改
4 years ago
tencent:
appID: 1302656840
region: ap-chengdu
bucket: echat-1302656840
secretID: AKIDGNYVChzIQinu7QEgtNp0hnNgqcV8vZTC
secretKey: kz15vW83qM6dBUWIq681eBZA0c0vlIbe
3 years ago
rpcport: #rpc服务端口 默认即可
openImUserPort: [ 10100 ]
openImFriendPort: [ 10200 ]
3 years ago
openImOfflineMessagePort: [ 10300 ]
4 years ago
openImOnlineRelayPort: [ 10400 ]
3 years ago
openImGroupPort: [ 10500 ]
openImAuthPort: [ 10600 ]
4 years ago
openImPushPort: [ 10700 ]
3 years ago
openImStatisticsPort: [ 10800 ]
3 years ago
openImMessageCmsPort: [ 10900 ]
3 years ago
openImAdminCmsPort: [ 11000 ]
3 years ago
c2c:
3 years ago
callbackBeforeSendMsg:
switch: false
timeoutStrategy: 1 #1:send
callbackAfterSendMsg:
switch: false
state:
stateChange:
switch: false
4 years ago
3 years ago
rpcregistername: #rpc注册服务名默认即可
3 years ago
openImUserName: User
4 years ago
openImFriendName: Friend
openImOfflineMessageName: OfflineMessage
openImPushName: Push
openImOnlineMessageRelayName: OnlineMessageRelay
openImGroupName: Group
openImAuthName: Auth
3 years ago
OpenImStatisticsName: Statistics
3 years ago
OpenImMessageCMSName: MessageCMS
3 years ago
openImAdminCMSName: AdminCMS
4 years ago
log:
storageLocation: ../logs/
rotationTime: 24
3 years ago
remainRotationCount: 5 #日志数量
remainLogLevel: 6 #日志级别 6表示全都打印测试阶段建议设置为6
4 years ago
elasticSearchSwitch: false
3 years ago
elasticSearchAddr: [ 127.0.0.1:9201 ]
4 years ago
elasticSearchUser: ""
elasticSearchPassword: ""
3 years ago
modulename: #日志文件按模块命名,默认即可
4 years ago
longConnSvrName: msg_gateway
msgTransferName: msg_transfer
pushName: push
longconnsvr:
3 years ago
openImWsPort: [ 17778 ] # ws服务端口默认即可要开放此端口或做nginx转发
4 years ago
websocketMaxConnNum: 10000
websocketMaxMsgLen: 4096
websocketTimeOut: 10
push:
3 years ago
tpns: #腾讯推送,暂未测试 暂不要使用
4 years ago
ios:
accessID: 1600018281
secretKey: 3cd68a77a95b89e5089a1aca523f318f
android:
accessID: 111
secretKey: 111
3 years ago
jpns: #极光推送 在极光后台申请后,修改以下四项,必须修改
appKey: cf47465a368f24c659608e7e
masterSecret: 02204efe3f3832947a236ee5
pushUrl: "https://api.jpush.cn/v3/push"
3 years ago
pushIntent: "intent:#Intent;component=io.openim.app.enterprisechat/io.openim.app.enterprisechat.MainActivity;end"
manager:
3 years ago
#app管理员userID和对应的secret 建议修改。 用于管理后台登录也可以用户管理后台对应的api
3 years ago
appManagerUid: [ "openIM123456","openIM654321", "openIM333", "openIMAdmin"]
3 years ago
secrets: [ "openIM1","openIM2", "openIM333", "openIMAdmin"]
4 years ago
secret: tuoyun
3 years ago
# 多端互踢策略
# 1多平台登录Android、iOS、Windows、Mac 每种平台只能一个在线web端可以多个同时在线
multiloginpolicy: 1
4 years ago
#token config
tokenpolicy:
3 years ago
accessSecret: "open_im_server" #token生成相关默认即可
# Token effective time day as a unit
3 years ago
accessExpire: 3650 #token过期时间
3 years ago
messagecallback: #暂时不要使用 还需完善
callbackUrl: "http://www.xxx.com/msg/judge"
#TimeOut use second as unit
3 years ago
callbackTimeOut: 10
3 years ago
# c2c:
# callbackBeforeSendMsg:
# switch: false
# timeoutStrategy: 1 #1:send
# callbackAfterSendMsg:
# switch: false
# state:
# stateChange:
# switch: false
3 years ago
#ios系统推送声音以及标记计数
3 years ago
iospush:
pushSound: "xxx"
3 years ago
badgeCount: true
notification:
groupCreated:
conversation:
3 years ago
reliabilityLevel: 3
3 years ago
unreadCount: true
offlinePush:
switch: true
3 years ago
title: "create group title" # xx create the group
desc: "create group desc"
ext: "create group ext"
defaultTips:
tips: "create the group" # xx create the group
3 years ago
groupInfoSet:
conversation:
3 years ago
reliabilityLevel: 3
unreadCount: true
3 years ago
offlinePush:
switch: false
3 years ago
title: "groupInfoSet title"
desc: "groupInfoSet desc"
ext: "groupInfoSet ext"
3 years ago
defaultTips:
3 years ago
tips: "modified the group profile" # group info changed by xx
3 years ago
joinGroupApplication:
conversation:
3 years ago
reliabilityLevel: 2
3 years ago
unreadCount: false
offlinePush:
switch: false
3 years ago
title: "joinGroupApplication title"
desc: "joinGroupApplication desc"
ext: "joinGroupApplication ext"
3 years ago
defaultTips:
3 years ago
tips: "apply to join the group" # group info changed by xx
3 years ago
memberQuit:
conversation:
3 years ago
reliabilityLevel: 3
unreadCount: true
3 years ago
offlinePush:
switch: false
3 years ago
title: "memberQuit title"
desc: "memberQuit desc"
ext: "memberQuit ext"
3 years ago
defaultTips:
3 years ago
tips: "quit group chat" # group info changed by xx
3 years ago
groupApplicationAccepted:
conversation:
3 years ago
reliabilityLevel: 2
3 years ago
unreadCount: true
3 years ago
offlinePush:
switch: false
3 years ago
title: "groupApplicationAccepted title"
desc: "groupApplicationAccepted desc"
ext: "groupApplicationAccepted ext"
3 years ago
defaultTips:
3 years ago
tips: "allowed to join the group" # group info changed by xx
3 years ago
groupApplicationRejected:
conversation:
3 years ago
reliabilityLevel: 2
3 years ago
unreadCount: false
offlinePush:
switch: false
3 years ago
title: " title"
desc: " desc"
ext: " ext"
3 years ago
defaultTips:
3 years ago
tips: "rejected into the group" # group info changed by xx
3 years ago
groupOwnerTransferred:
conversation:
3 years ago
reliabilityLevel: 3
unreadCount: true
3 years ago
offlinePush:
switch: false
3 years ago
title: "groupOwnerTransferred title"
desc: "groupOwnerTransferred desc"
ext: "groupOwnerTransferred ext"
3 years ago
defaultTips:
3 years ago
tips: "become a new group owner" # group info changed by xx
3 years ago
3 years ago
memberKicked:
conversation:
3 years ago
reliabilityLevel: 3
unreadCount: true
offlinePush:
3 years ago
switch: false
3 years ago
title: "memberKicked title"
desc: "memberKicked desc"
ext: "memberKicked ext"
defaultTips:
3 years ago
tips: "kicked out of the group" # group info changed by xx
3 years ago
3 years ago
memberInvited:
conversation:
3 years ago
reliabilityLevel: 3
unreadCount: true
3 years ago
offlinePush:
switch: false
3 years ago
title: "memberInvited title"
desc: "memberInvited desc"
ext: "memberInvited ext"
3 years ago
defaultTips:
3 years ago
tips: "invited into the group" # group info changed by xx
3 years ago
memberEnter:
conversation:
3 years ago
reliabilityLevel: 3
unreadCount: true
3 years ago
offlinePush:
switch: false
3 years ago
title: "memberEnter title"
desc: "memberEnter desc"
ext: "memberEnter ext"
3 years ago
defaultTips:
3 years ago
tips: "entered the group" # group info changed by xx
3 years ago
#############################friend#################################
3 years ago
friendApplicationAdded:
3 years ago
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" #
3 years ago
friendApplicationApproved:
3 years ago
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" #
3 years ago
friendApplicationRejected:
3 years ago
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" #
3 years ago
friendAdded:
3 years ago
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" #
3 years ago
friendDeleted:
3 years ago
conversation:
reliabilityLevel: 2
unreadCount: false
offlinePush:
switch: true
3 years ago
title: "deleted a friend"
desc: "deleted a friend"
ext: "deleted a friend"
3 years ago
defaultTips:
3 years ago
tips: "deleted a friend" #
3 years ago
3 years ago
friendRemarkSet:
3 years ago
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" #
3 years ago
blackAdded:
3 years ago
conversation:
reliabilityLevel: 2
unreadCount: false
offlinePush:
switch: true
3 years ago
title: "blocked a user"
desc: "blocked a user"
ext: "blocked a user"
3 years ago
defaultTips:
3 years ago
tips: "blocked a user" #
3 years ago
3 years ago
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:
3 years ago
conversation:
reliabilityLevel: 2
unreadCount: false
offlinePush:
switch: true
title: "Remove a blocked user"
desc: "Remove a blocked user"
ext: "Remove a blocked user"
defaultTips:
3 years ago
tips: "remove a blocked user"
3 years ago
3 years ago
#####################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"
3 years ago
#---------------demo configuration---------------------#
#The following configuration items are applied to openIM Demo configuration
#是否启动demo如果自身没有账号体系设置为true
demoswitch: true
demo:
3 years ago
openImDemoPort: [ 42233 ] #demo对外服务端口默认即可需要开放此端口或做nginx转发
alismsverify: #阿里云短信配置,在阿里云申请成功后修改以下四项,必须修改
accessKeyId: LTAI5tJPkn4HuuePdiLdGqe71
accessKeySecret: 4n9OJ7ZCVN1U6KeHDAtOyNeVZcjOuV1
signName: OpenIM Corporation
verificationCodeTemplateCode: SMS_2268101641
3 years ago
superCode: 666666 #超级验证码,建议修改掉,收不到短信验证码时可以用此替代
3 years ago
# second
3 years ago
codeTTL: 60
3 years ago
mail: #仅支持qq邮箱具体操作参考 https://service.mail.qq.com/cgi-bin/help?subtype=1&id=28&no=1001256 必须修改
title: "openIM"
3 years ago
senderMail: "1765567899@qq.com"
senderAuthorizationCode: "1gxyausfoevlzbfag"
smtpAddr: "smtp.qq.com"
3 years ago
smtpPort: 25 #需开放此端口 出口方向
3 years ago