diff --git a/config/config.yaml b/config/config.yaml new file mode 100644 index 000000000..a50d2af25 --- /dev/null +++ b/config/config.yaml @@ -0,0 +1,115 @@ +# Copyright © 2023 OpenIM open source community. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# 需要先启动OpenIMServer +envs: + discovery: "zookeeper" + +zookeeper: + schema: openim + zkAddr: + - 127.0.0.1:12181 + username: "" + password: "" + +chatApi: + openImChatApiPort: [ 10008 ] + listenIP: + +adminApi: + openImAdminApiPort: [ 10009 ] + listenIP: + +rpc: + registerIP: #作为rpc启动时,注册到zookeeper的IP,api/gateway能访问到此ip和对应的rpcPort中的端口 + listenIP: #默认为0.0.0.0 + +rpcPort: + openImAdminPort: [ 30200 ] + openImChatPort: [ 30300 ] +rpcRegisterName: + openImAdminName: admin + openImChatName: chat + +# 没有配置表示和OpenIM一致 +mysql: + address: [ 127.0.0.1:13306 ] #目前仅支持单机 + username: root #用户名 + password: openIM123 #密码 + database: openIM_v3 #不建议修改 + maxOpenConn: 1000 #最大连接数 + maxIdleConn: 100 #最大空闲连接数 + maxLifeTime: 60 #连接可以重复使用的最长时间(秒) + logLevel: 4 #日志级别 1=slient 2=error 3=warn 4=info + slowThreshold: 500 #慢语句阈值 (毫秒) + +# 没有配置表示和OpenIM一致 +log: + storageLocation: ../logs/ #存放目录 + rotationTime: 24 #日志旋转时间 + remainRotationCount: 2 #日志数量 + remainLogLevel: 6 #日志级别 6表示全都打印, + isStdout: false + isJson: false + withStack: false + +secret: openIM123 +tokenPolicy: + expire: 86400 + +verifyCode: + validTime: 300 # 验证码有效时间 + validCount: 5 # 验证码有效次数 + uintTime: 86400 # 单位时间间隔 + maxCount: 10 # 单位时间内最大获取次数 + superCode: "666666" # 超级验证码(只有use为空时使用) + len: 6 # 验证码长度 + use: "" # 使用的验证码服务(use: "ali") + ali: + endpoint: "dysmsapi.aliyuncs.com" + accessKeyId: "" + accessKeySecret: "" + signName: "" + verificationCodeTemplateCode: "" + mail: # 根据对应的发件邮箱更改 sendMail、senderAuthorizationCode、smtpAddr、smtpPort 即可 + title: "" + senderMail: "" # 发送者 + senderAuthorizationCode: "" # 授权码 + smtpAddr: "smtp.qq.com" # smtp 服务器地址 + smtpPort: 465 # smtp 服务器邮件发送端口 + testDepartMentID: 001 + imAPIURL: http://127.0.0.1:10002 + + +# 获取ip的header,没有配置直接获取远程地址 +proxyHeader: "X-Forwarded-For" + +adminList: + - adminID: admin1 + nickname: chat1 + imAdmin: openIM123456 + - adminID: admin2 + nickname: chat2 + imAdmin: openIM654321 + - adminID: admin3 + nickname: chat3 + imAdmin: openIMAdmin + + +openIMUrl: "http://127.0.0.1:10002" + +redis: + address: [ 127.0.0.1:16379 ] + username: + password: openIM123