Skip to content

Commit c300035

Browse files
authored
refactor(docs): improve quickTestServer and dockerCompose documentation (#292)
* docs(core): add PC Web verification note and clarifications * docs(core): Add anchor link to Kafka setup guide
1 parent b27f78d commit c300035

6 files changed

Lines changed: 44 additions & 29 deletions

File tree

docs/guides/gettingStarted/dockerCompose.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ docker compose down
5555
- 查看日志:
5656

5757
```bash
58-
docker logs -f openim-server
58+
docker compose logs -f openim-server openim-chat
5959
```
6060

6161
### 2.4 监控告警(可选)
@@ -77,14 +77,11 @@ docker compose --profile m up -d
7777

7878
快速体验 OpenIMSDK 核心能力,并测试 OpenIMServer/ChatServer 部署是否正常,请参考[快速验证](./quickTestServer)
7979

80-
> 补充(基于当前项目目录):如果你是按 `open-im-server` + `chat` 两个源码仓库部署,`open-im-server/docker-compose.yml` 主要用于依赖组件,ChatServer 仍需在 `chat` 目录执行 `mage start`。可参考[源码部署](./imSourceCodeDeployment)
81-
82-
8380
## 4. 常见问题
8481

8582
### unhealthy定位
86-
1. 执行 `docker exec -it openim-server mage check` 确认是否超过一分钟
87-
2. 执行 docker logs -f openim-server 查看日志;
83+
1. 执行 `docker exec -it openim-server mage check` `docker exec -it openim-chat mage check`,确认是否持续超过一分钟
84+
2. 执行 `docker compose logs -f openim-server openim-chat` 查看日志;
8885
3. 如果 `openim-chat` 在启动初期短暂报 `connect: connection refused`,先等待 `30-60s` 后再复查健康状态;这通常是依赖 `openim-server` 尚未完全就绪导致的启动时序现象。
8986

9087
### 配置项修改

docs/guides/gettingStarted/env-comp.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,23 @@ sidebar_position: 1
2222

2323
## 三、环境要求
2424

25-
| 注意事项 | 详细说明 | 补充说明 |
26-
| --- | --- | --- |
27-
| 操作系统 | Linux | 官方使用 `ubuntu 22.04`,实测 `Debian 13` 也可运行 |
25+
| 注意事项 | 详细说明 | 补充说明 |
26+
| --- |------------------|------------------------------------------------|
27+
| 操作系统 | Linux | 官方使用 `ubuntu 22.04`,实测 `Debian 13` 也可运行 |
2828
| 硬件资源 | 8核16G,10M带宽,1T磁盘 | 按 10 万注册用户、10% 日常在线、5 万大群、每秒 600 条消息估算;需有外网 IP |
29-
| CPU 架构 | `x86_64` | arm 架构需自行测试 |
30-
| Golang | `v1.22.7` 或更高版本 | [安装参考](https://go.dev/learn/) |
31-
| Docker | `v24.0.5` 或更高版本 | 自带 `compose` 功能 |
32-
| Git | `v2.17.1` 或更高版本 | [安装参考](https://git-scm.com/downloads) |
29+
| CPU 架构 | `x86_64``arm64` | 其他架构需自行测试 |
30+
| Golang | `v1.22.7` 或更高版本 | [安装参考](https://go.dev/learn/) |
31+
| Docker | `v24.0.5` 或更高版本 | 自带 `compose` 功能 |
32+
| Git | `v2.17.1` 或更高版本 | [安装参考](https://git-scm.com/downloads) |
3333

3434
## 四、外部组件要求
3535

36-
| 组件 | 建议版本 | 支持模式 | 支持云服务 / 备注 |
37-
| --- | --- |----------------------------------- |-------------------------------------------------|
38-
| MongoDB | `v7.0` | `standalone``replicaSet``sharded` | 支持;如接副本集或分片集群,建议优先使用 `uri` |
39-
| Redis | `v7.0.0` | `standalone``cluster``sentinel` | 支持 |
40-
| Etcd | `v3.5.13` | 单机、多节点集群 | 不支持云服务 |
41-
| Kafka | `v3.5.1` | 单机、分布式集群 | 支持;需按文档预建 topic |
42-
| MinIO | `RELEASE.2024-01-11T07-46-16Z` | 单机 | 可替换为 S3 兼容存储(`COS``OSS``Kodo`(社区维护)、`AWS S3`|
36+
| 组件 | 建议版本 | 支持模式 | 支持云服务 / 备注 |
37+
| --- | --- |----------------------------------- |---------------------------------------------------------------------|
38+
| MongoDB | `v7.0` | `standalone``replicaSet``sharded` | 支持;如接副本集或分片集群,建议优先使用 `uri` |
39+
| Redis | `v7.0.0` | `standalone``cluster``sentinel` | 支持 |
40+
| Etcd | `v3.5.13` | 单机、多节点集群 | 不支持云服务 |
41+
| Kafka | `v3.5.1` | 单机、分布式集群 | 支持;[按文档预建 topic](./imSourceCodeDeployment#22-自行部署组件或使用云服务时的初始化要求) |
42+
| MinIO | `RELEASE.2024-01-11T07-46-16Z` | 单机 | 可替换为 S3 兼容存储(`COS``OSS``Kodo`(社区维护)、`AWS S3` |
4343

4444
---

docs/guides/gettingStarted/quickTestServer.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ sidebar_position: 9
2121

2222
![PC Web Interface](./assets/pc-web.png)
2323

24+
如果还没有测试账号,可按以下步骤完成注册:
25+
26+
1. 在登录页底部点击 `立即注册`
27+
2. 按页面提示填写注册信息;如果当前部署启用了注册验证码,还需完成对应验证码校验;
28+
3. 注册成功后返回登录页,使用新账号登录,再继续后续验证。
29+
30+
> 如果当前部署关闭了自助注册,请改用已有测试账号进行验证。
31+
2432
如果需要在 PC Web 上注册账号,默认配置下可直接使用验证码 `666666`
2533

2634
> 该值来自 `chat/config/chat-rpc-chat.yml` 中的 `verifyCode.superCode`;默认 `phone.use``mail.use` 也都是 `superCode`。如果你已经修改过配置,请以实际部署值为准。
@@ -29,13 +37,15 @@ sidebar_position: 9
2937

3038
确认 OpenIMServer 与 ChatServer 进程状态正常。
3139

40+
### Docker部署
41+
3242
```bash
3343
docker ps | grep -E 'openim-server|openim-chat'
3444
```
3545

3646
> `docker部署` 场景下,`openim-server``openim-chat` 在启动初期可能先显示 `health: starting`;建议等待 `20-30s`,确认状态进入 `healthy` 后再继续接口验证。
3747
38-
如果是源码部署,可执行:
48+
### 源码部署
3949

4050
```bash
4151
# Run in the open-im-server directory

i18n/en/docusaurus-plugin-content-docs-guides/current/gettingStarted/dockerCompose.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ docker compose down
5252
- View logs:
5353

5454
```bash
55-
docker logs -f openim-server
55+
docker compose logs -f openim-server openim-chat
5656
```
5757

5858
### 2.4 Monitoring & Alerting (Optional)
@@ -74,13 +74,11 @@ Default ports follow the current `.env`. Common values are:
7474

7575
To quickly experience core OpenIMSDK capabilities and verify whether OpenIMServer / ChatServer deployment is working, refer to [Quick Verification](./quickTestServer).
7676

77-
> Additional note for the current project layout: if you deploy from the two source repositories `open-im-server` and `chat`, `open-im-server/docker-compose.yml` is mainly used for dependency components, and ChatServer still needs to be started with `mage start` in the `chat` directory. See [Source Code Deployment](./imSourceCodeDeployment).
78-
7977
## 4. FAQ
8078

8179
### Troubleshooting `unhealthy`
82-
1. Run `docker exec -it openim-server mage check` and confirm whether the state lasts longer than one minute.
83-
2. Run `docker logs -f openim-server` to inspect logs.
80+
1. Run `docker exec -it openim-server mage check` and `docker exec -it openim-chat mage check`, then confirm whether either state lasts longer than one minute.
81+
2. Run `docker compose logs -f openim-server openim-chat` to inspect logs.
8482
3. If `openim-chat` briefly reports `connect: connection refused` during startup, wait `30-60s` and check again. This is usually a startup ordering issue while `openim-server` is still becoming ready.
8583

8684
### Configuration Changes

i18n/en/docusaurus-plugin-content-docs-guides/current/gettingStarted/env-comp.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ sidebar_position: 1
2626
| --- | --- | --- |
2727
| Operating system | Linux | Officially uses `ubuntu 22.04`; `Debian 13` has also been verified to work |
2828
| Hardware resources | 8 CPU cores, 16 GB RAM, 10 Mbps bandwidth, 1 TB disk | Estimated for 100k registered users, 10% daily online ratio, 50k-member large groups, and 600 messages per second; requires a public IP |
29-
| CPU architecture | `x86_64` | ARM requires separate verification |
29+
| CPU architecture | `x86_64`, `arm64` | Other architectures require separate verification |
3030
| Golang | `v1.22.7` or higher | [Installation reference](https://go.dev/learn/) |
3131
| Docker | `v24.0.5` or higher | Must include `compose` support |
3232
| Git | `v2.17.1` or higher | [Installation reference](https://git-scm.com/downloads) |
@@ -38,7 +38,7 @@ sidebar_position: 1
3838
| MongoDB | `v7.0` | `standalone`, `replicaSet`, `sharded` | Supported; for replica sets or sharded clusters, `uri` is preferred |
3939
| Redis | `v7.0.0` | `standalone`, `cluster`, `sentinel` | Supported |
4040
| Etcd | `v3.5.13` | Single node, multi-node cluster | No managed cloud support |
41-
| Kafka | `v3.5.1` | Single node, distributed cluster | Supported; create the required topics in advance according to the docs |
41+
| Kafka | `v3.5.1` | Single node, distributed cluster | Supported; [create the required topics in advance according to the docs](./imSourceCodeDeployment#22-initialization-requirements-for-self-hosted-components-or-cloud-services) |
4242
| MinIO | `RELEASE.2024-01-11T07-46-16Z` | Single node | Can be replaced with S3-compatible storage such as `COS`, `OSS`, `Kodo` (community-maintained), or `AWS S3` |
4343

4444
---

i18n/en/docusaurus-plugin-content-docs-guides/current/gettingStarted/quickTestServer.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ Enter `http://your_server_ip:11001` in your browser to access PC Web. `your_serv
2121

2222
![PC Web Interface](./assets/pc-web.png)
2323

24+
If you do not have a test account yet, complete registration with the following steps:
25+
26+
1. Click the registration entry at the bottom of the login page.
27+
2. Fill in the required registration information. If registration verification codes are enabled in the current deployment, complete that verification as well.
28+
3. After registration succeeds, return to the login page, sign in with the new account, and continue the remaining verification steps.
29+
30+
> If self-service registration is disabled in the current deployment, use an existing test account instead.
31+
2432
If you need to register an account on PC Web, the default verification code is `666666`.
2533

2634
> This value comes from `verifyCode.superCode` in `chat/config/chat-rpc-chat.yml`. By default, both `phone.use` and `mail.use` are also set to `superCode`. If you have changed the configuration, use the actual deployed value.
@@ -29,13 +37,15 @@ If you need to register an account on PC Web, the default verification code is `
2937

3038
Confirm that OpenIMServer and ChatServer are running normally.
3139

40+
### Docker Deployment
41+
3242
```bash
3343
docker ps | grep -E 'openim-server|openim-chat'
3444
```
3545

3646
> In the `docker deployment` scenario, `openim-server` and `openim-chat` may initially show `health: starting`. Wait `20-30s` until they become `healthy` before continuing with API verification.
3747
38-
If you use source deployment, run:
48+
### Source Code Deployment
3949

4050
```bash
4151
# Run in the open-im-server directory

0 commit comments

Comments
 (0)