mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-11-04 19:32:17 +08:00
Merge remote-tracking branch 'origin/3.6.1-code-conventions' into 3.6.1-code-conventions
This commit is contained in:
commit
c3e7c80f75
75
config/README_zh_CN.md
Normal file
75
config/README_zh_CN.md
Normal file
@ -0,0 +1,75 @@
|
||||
# OpenIM配置文件说明以及常用配置修改说明
|
||||
|
||||
## 配置文件说明
|
||||
|
||||
| Configuration File | Description |
|
||||
| ------------------------------- | ------------------------------------------------------------ |
|
||||
| **kafka.yml** | Kafka用户名、密码、地址等配置 |
|
||||
| **redis.yml** | Redis密码、地址等配置 |
|
||||
| **minio.yml** | MinIO用户名、密码、地址及外网IP域名等配置;未修改外网IP或域名可能导致图片文件发送失败 |
|
||||
| **zookeeper.yml** | ZooKeeper用户、密码、地址等配置 |
|
||||
| **mongodb.yml** | MongoDB用户名、密码、地址等配置 |
|
||||
| **log.yml** | 日志级别及存储目录等配置 |
|
||||
| **notification.yml** | 添加好友、创建群组等事件通知配置 |
|
||||
| **share.yml** | OpenIM各服务所需的公共配置,如secret等 |
|
||||
| **webhooks.yml** | Webhook中URL等配置 |
|
||||
| **local-cache.yml** | 本地缓存配置 |
|
||||
| **openim-rpc-third.yml** | openim-rpc-third服务的监听IP、端口及图片视频对象存储配置 |
|
||||
| **openim-rpc-user.yml** | openim-rpc-user服务的监听IP、端口配置 |
|
||||
| **openim-api.yml** | openim-api服务的监听IP、端口等配置项 |
|
||||
| **openim-crontask.yml** | openim-crontask服务配置 |
|
||||
| **openim-msggateway.yml** | openim-msggateway服务的监听IP、端口等配置 |
|
||||
| **openim-msgtransfer.yml** | openim-msgtransfer服务配置 |
|
||||
| **openim-push.yml** | openim-push服务的监听IP、端口及离线推送配置 |
|
||||
| **openim-rpc-auth.yml** | openim-rpc-auth服务的监听IP、端口及token有效期等配置 |
|
||||
| **openim-rpc-conversation.yml** | openim-rpc-conversation服务的监听IP、端口等配置 |
|
||||
| **openim-rpc-friend.yml** | openim-rpc-friend服务的监听IP、端口等配置 |
|
||||
| **openim-rpc-group.yml** | openim-rpc-group服务的监听IP、端口等配置 |
|
||||
| **openim-rpc-msg.yml** | openim-rpc-msg服务的监听IP、端口及消息发送是否验证好友关系等配置 |
|
||||
|
||||
## 常用配置修改
|
||||
|
||||
| 修改配置项 | 配置文件 |
|
||||
| ----------------------------------------------- | ----------------------- |
|
||||
| 使用minio作为图片视频文件对象存储 | `minio.yml` |
|
||||
| 生产环境日志调整 | `log.yml` |
|
||||
| 发送消息是否验证好友关系 | `openim-rpc-msg.yml` |
|
||||
| 修改secret | `share.yml` |
|
||||
| 使用oss, cos, aws, kodo作为图片视频文件对象存储 | `openim-rpc-third.yml` |
|
||||
| 设置多端互踢策略 | `openim-msggateway.yml` |
|
||||
| 设置离线推送 | `openim-push.yml` |
|
||||
|
||||
## 启动某个OpenIM服务的多个实例
|
||||
|
||||
若要启动某个OpenIM的多个实例,只需增加对应的端口数,并修改项目根目录下的`start-config.yml`文件,重启服务即可生效。例如,启动2个`openim-rpc-user`实例的配置如下:
|
||||
|
||||
```yaml
|
||||
rpc:
|
||||
registerIP: ''
|
||||
listenIP: 0.0.0.0
|
||||
ports: [ 10110, 10111 ]
|
||||
|
||||
prometheus:
|
||||
enable: true
|
||||
ports: [ 20100, 20101 ]
|
||||
```
|
||||
|
||||
修改`start-config.yml`:
|
||||
|
||||
```yaml
|
||||
serviceBinaries:
|
||||
openim-rpc-user: 2
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1,67 +0,0 @@
|
||||
配置文件说明
|
||||
|
||||
每个组件单独有一个配置文件,主要是地址及账号密码信息。
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
callback
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
rpc共同配置项说明
|
||||
|
||||
```
|
||||
rpc:
|
||||
#api或其他rpc可通过这个ip访问到此rpc,如果为空则获取内网ip,默认为空即可
|
||||
registerIP: ''
|
||||
#监听ip,如果为0.0.0.0,则内外网ip都监听,为空则自动获取内网ip监听
|
||||
listenIP: 0.0.0.0
|
||||
#监听端口,如果配置多个则会启动多个实例,但需和prometheus.ports保持一致
|
||||
ports: [ 10120 ]
|
||||
|
||||
prometheus:
|
||||
enable: true
|
||||
#prometheus
|
||||
ports: [ 20104 ]
|
||||
```
|
||||
|
||||
|
||||
|
||||
api配置项说明
|
||||
|
||||
```
|
||||
api:
|
||||
#0.0.0.0表示内外网ip都监听,不应该修改
|
||||
listenIP: 0.0.0.0
|
||||
#监听端口,如果配置多个则会启动多个实例,和prometheus.ports保持一致
|
||||
ports: [ 10002 ]
|
||||
|
||||
prometheus:
|
||||
enable: true
|
||||
ports: [ 20113 ]
|
||||
#怎么描述 grafanaURL地址, 外网地址,通过浏览器能访问到
|
||||
grafanaURL: http://127.0.0.1:13000/
|
||||
```
|
||||
|
||||
|
||||
|
||||
log配置项说明
|
||||
|
||||
```
|
||||
#log存放路径,如果要修改则改为全路径
|
||||
storageLocation: ../../../../logs/
|
||||
rotationTime: 24
|
||||
remainRotationCount: 2
|
||||
#3: 生产环境; 6:日志较多,调试环境
|
||||
remainLogLevel: 6
|
||||
isStdout: false
|
||||
isJson: false
|
||||
withStack: false
|
||||
```
|
||||
|
||||
|
||||
|
||||
@ -1,7 +1,13 @@
|
||||
# Log storage path, default is acceptable, change to a full path if modification is needed
|
||||
storageLocation: ../../../../logs/
|
||||
# Log rotation period (in hours), default is acceptable
|
||||
rotationTime: 24
|
||||
# Number of log files to retain, default is acceptable
|
||||
remainRotationCount: 2
|
||||
# Log level settings: 3 for production environment; 6 for more verbose logging in debugging environments
|
||||
remainLogLevel: 6
|
||||
# Whether to output to standard output, default is acceptable
|
||||
isStdout: false
|
||||
# Whether to log in JSON format, default is acceptable
|
||||
isJson: false
|
||||
withStack: false
|
||||
|
||||
|
||||
@ -1,8 +1,13 @@
|
||||
api:
|
||||
# Listening IP; 0.0.0.0 means both internal and external IPs are listened to, default is recommended
|
||||
listenIP: 0.0.0.0
|
||||
# Listening ports; if multiple are configured, multiple instances will be launched, must be consistent with the number of prometheus.ports
|
||||
ports: [ 10002 ]
|
||||
|
||||
prometheus:
|
||||
# Whether to enable prometheus
|
||||
enable: true
|
||||
# Prometheus listening ports, must match the number of api.ports
|
||||
ports: [ 20113 ]
|
||||
grafanaURL: webhook://127.0.0.1:13000/
|
||||
# This address can be accessed via a browser
|
||||
grafanaURL: http://127.0.0.1:13000/
|
||||
|
||||
@ -1,10 +1,17 @@
|
||||
rpc:
|
||||
# API or other RPCs can access this RPC through this IP; if left blank, the internal network IP is obtained by default
|
||||
registerIP: ''
|
||||
# Listening IP; 0.0.0.0 means both internal and external IPs are listened to, if blank, the internal network IP is automatically obtained by default
|
||||
listenIP: 0.0.0.0
|
||||
# Listening ports; if multiple are configured, multiple instances will be launched, and must be consistent with the number of prometheus.ports
|
||||
ports: [ 10110 ]
|
||||
|
||||
prometheus:
|
||||
# Whether to enable prometheus
|
||||
enable: true
|
||||
# Prometheus listening ports, must be consistent with the number of rpc.ports
|
||||
ports: [ 20100 ]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user