Skip to content

Commit 5c8f543

Browse files
authored
docs: update config readme. (#650)
1 parent 6acad44 commit 5c8f543

2 files changed

Lines changed: 89 additions & 0 deletions

File tree

config/README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# OpenIM Chat Configuration Files and Common Configuration Item Modifications Guide
2+
3+
## Configuration Files Explanation
4+
5+
| Configuration File | Description |
6+
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
7+
| **redis.yml** | Configurations for Redis password, address, etc. |
8+
| **mongodb.yml** | Configurations for MongoDB username, password, address, etc. |
9+
| **share.yml** | Common configurations needed by various OpenIM services, such as secret. |
10+
| **discovery.yml** | Service discovery account, password, service name and other configurations. |
11+
| **chat-api-chat.yml** | Configurations for listening IP, port, etc., in chat-api-chat service. |
12+
| **chat-api-admin.yml** | Configurations for listening IP, port, etc., in chat-api-admin service. |
13+
| **chat-rpc-chat.yml** | Configurations for listening IP, port, login registration verification code, registration allowance, and livekit in chat-rpc-chat service. |
14+
| **chat-rpc-admin.yml** | Configurations for listening IP, port, chat backend token expiration policy, and chat backend Secret in chat-rpc-admin service. |
15+
16+
## Common Configuration Item Modifications
17+
18+
| Configuration Item to Modify | Configuration File |
19+
| ----------------------------------------- | -------------------- |
20+
| Modify OpenIM secret | `share.yml` |
21+
| Production environment logs | `log.yml` |
22+
| Modify chat Admin username and password | `share.yml` |
23+
| Modify verification code | `chat-rpc-chat.yml` |
24+
| Allow user registration | `chat-rpc-chat.yml` |
25+
| Modify chat Admin token expiration policy | `chat-rpc-admin.yml` |
26+
| Modify chat Admin Secret | `chat-rpc-admin.yml` |
27+
28+
## Starting Multiple Instances of an OpenIM Service
29+
30+
To launch multiple instances of an OpenIM service, you just need to increase the corresponding number of ports and modify the `start-config.yml` file in the project's root directory, then restart the service for the changes to take effect. For example, the configuration for launching 2 instances of `chat-rpc` is as follows:
31+
32+
```yaml
33+
rpc:
34+
registerIP: ""
35+
listenIP: 0.0.0.0
36+
ports: [30300, 30301]
37+
```
38+
39+
Modify `start-config.yml`:
40+
41+
```yaml
42+
serviceBinaries:
43+
chat-rpc: 2
44+
```

config/README_zh_CN.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# OpenIM Chat 配置文件说明以及常用配置修改说明
2+
3+
## 配置文件说明
4+
5+
| Configuration File | Description |
6+
| ---------------------- | ----------------------------------------------------------------------------------------- |
7+
| **redis.yml** | Redis 密码、地址等配置 |
8+
| **mongodb.yml** | MongoDB 用户名、密码、地址等配置 |
9+
| **log.yml** | 日志级别及存储目录等配置 |
10+
| **share.yml** | OpenIM 各服务所需的公共配置,如 secret、Admin 后台密码等 |
11+
| **discovery.yml** | 服务发现对应的账号密码和服务名等配置 |
12+
| **chat-api-chat.yml** | chat-api-chat 服务的监听 IP、端口等配置 |
13+
| **chat-api-admin.yml** | chat-api-admin 服务的监听 IP、端口等配置 |
14+
| **chat-rpc-chat.yml** | chat-rpc-chat.yml 服务的监听 IP、端口以及登录注册验证码、是否允许注册和 livekit 等配置 |
15+
| **chat-rpc-admin.yml** | chat-rpc-admin 服务的监听 IP、端口以及 chat 后台 token 过期策略和 chat 后台 Secret 等配置 |
16+
17+
## 常用配置修改
18+
19+
| 修改配置项 | 配置文件 |
20+
| ----------------------------- | -------------------- |
21+
| 修改 OpenIM secret | `share.yml` |
22+
| 生产环境日志调整 | `log.yml` |
23+
| 修改 chat Admin | `share.yml` |
24+
| 修改验证码相关配置 | `chat-rpc-chat.yml` |
25+
| 允许用户注册 | `chat-rpc-chat.yml` |
26+
| 修改 chat 后台 token 过期策略 | `chat-rpc-admin.yml` |
27+
| 修改 chat 后台 Secret | `chat-rpc-admin.yml` |
28+
29+
## 启动某个 OpenIM 服务的多个实例
30+
31+
若要启动某个 OpenIM 的多个实例,只需增加对应的端口数,并修改项目根目录下的`start-config.yml`文件,重启服务即可生效。例如,启动 2 个`chat-rpc`实例的配置如下:
32+
33+
```yaml
34+
rpc:
35+
registerIP: ""
36+
listenIP: 0.0.0.0
37+
ports: [30300, 30301]
38+
```
39+
40+
Modify start-config.yml:
41+
42+
```yaml
43+
serviceBinaries:
44+
chat-rpc: 2
45+
```

0 commit comments

Comments
 (0)