Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions config/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# OpenIM Chat Configuration Files and Common Configuration Item Modifications Guide

## Configuration Files Explanation

| Configuration File | Description |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| **redis.yml** | Configurations for Redis password, address, etc. |
| **mongodb.yml** | Configurations for MongoDB username, password, address, etc. |
| **share.yml** | Common configurations needed by various OpenIM services, such as secret. |
| **discovery.yml** | Service discovery account, password, service name and other configurations. |
| **chat-api-chat.yml** | Configurations for listening IP, port, etc., in chat-api-chat service. |
| **chat-api-admin.yml** | Configurations for listening IP, port, etc., in chat-api-admin service. |
| **chat-rpc-chat.yml** | Configurations for listening IP, port, login registration verification code, registration allowance, and livekit in chat-rpc-chat service. |
| **chat-rpc-admin.yml** | Configurations for listening IP, port, chat backend token expiration policy, and chat backend Secret in chat-rpc-admin service. |

## Common Configuration Item Modifications

| Configuration Item to Modify | Configuration File |
| ----------------------------------------- | -------------------- |
| Modify OpenIM secret | `share.yml` |
| Production environment logs | `log.yml` |
| Modify chat Admin username and password | `share.yml` |
| Modify verification code | `chat-rpc-chat.yml` |
| Allow user registration | `chat-rpc-chat.yml` |
| Modify chat Admin token expiration policy | `chat-rpc-admin.yml` |
| Modify chat Admin Secret | `chat-rpc-admin.yml` |

## Starting Multiple Instances of an OpenIM Service

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:

```yaml
rpc:
registerIP: ""
listenIP: 0.0.0.0
ports: [30300, 30301]
```

Modify `start-config.yml`:

```yaml
serviceBinaries:
chat-rpc: 2
```
45 changes: 45 additions & 0 deletions config/README_zh_CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# OpenIM Chat 配置文件说明以及常用配置修改说明

## 配置文件说明

| Configuration File | Description |
| ---------------------- | ----------------------------------------------------------------------------------------- |
| **redis.yml** | Redis 密码、地址等配置 |
| **mongodb.yml** | MongoDB 用户名、密码、地址等配置 |
| **log.yml** | 日志级别及存储目录等配置 |
| **share.yml** | OpenIM 各服务所需的公共配置,如 secret、Admin 后台密码等 |
| **discovery.yml** | 服务发现对应的账号密码和服务名等配置 |
| **chat-api-chat.yml** | chat-api-chat 服务的监听 IP、端口等配置 |
| **chat-api-admin.yml** | chat-api-admin 服务的监听 IP、端口等配置 |
| **chat-rpc-chat.yml** | chat-rpc-chat.yml 服务的监听 IP、端口以及登录注册验证码、是否允许注册和 livekit 等配置 |
| **chat-rpc-admin.yml** | chat-rpc-admin 服务的监听 IP、端口以及 chat 后台 token 过期策略和 chat 后台 Secret 等配置 |

## 常用配置修改

| 修改配置项 | 配置文件 |
| ----------------------------- | -------------------- |
| 修改 OpenIM secret | `share.yml` |
| 生产环境日志调整 | `log.yml` |
| 修改 chat Admin | `share.yml` |
| 修改验证码相关配置 | `chat-rpc-chat.yml` |
| 允许用户注册 | `chat-rpc-chat.yml` |
| 修改 chat 后台 token 过期策略 | `chat-rpc-admin.yml` |
| 修改 chat 后台 Secret | `chat-rpc-admin.yml` |

## 启动某个 OpenIM 服务的多个实例

若要启动某个 OpenIM 的多个实例,只需增加对应的端口数,并修改项目根目录下的`start-config.yml`文件,重启服务即可生效。例如,启动 2 个`chat-rpc`实例的配置如下:

```yaml
rpc:
registerIP: ""
listenIP: 0.0.0.0
ports: [30300, 30301]
```

Modify start-config.yml:

```yaml
serviceBinaries:
chat-rpc: 2
```