Skip to content

Commit 8f84ff5

Browse files
shimonenatoripcjs
authored andcommitted
docs: add dual-language support for docs and config
1 parent 59cc62b commit 8f84ff5

File tree

17 files changed

+337
-157
lines changed

17 files changed

+337
-157
lines changed

README.en.md

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
<div align="center"> English | <a href="./README.md">简体中文</a> </div>
2+
3+
# docker
4+
5+
docker configuration repository
6+
7+
## Deployment
8+
9+
### 1. Initialization
10+
11+
```sh
12+
mkdir -p /home/docker-compose
13+
mkdir /data
14+
git clone https://github.com/TranscodeGroup/docker.git /home/docker
15+
```
16+
17+
### 2. Configure `compose.yaml`
18+
19+
Create `/home/docker-compose/compose.yaml` file, refer to the following example:
20+
21+
**Single machine separate deployment**:
22+
23+
- [bus-http](./examples/bus-http/compose.yaml): Bus http single machine deployment
24+
- [bus-https](./examples/bus-https/compose.yaml): Bus https single machine deployment
25+
- [track-http](./examples/track-http/compose.yaml): Tracker V2 http single machine deployment
26+
- [track-https](./examples/track-https/compose.yaml): Tracker V2 https single machine deployment
27+
28+
**Distributed deployment**:
29+
30+
- [video-storage](./examples/video-storage/compose.yaml): RTP storage
31+
- [video-stream](./examples/video-stream/compose.yaml): RTP video
32+
33+
### 3. Configure `.env`
34+
35+
Create `/home/docker-compose/.env` file, refer to [.env.default](./.env.default) to override the configuration items that need to be changed.
36+
37+
Execute the following command in `/home/docker-compose` to verify whether all required values used have been set:
38+
39+
```sh
40+
docker compose config
41+
```
42+
43+
After passing the verification, execute the following command to export the compose configuration to a file, so as to compare the differences after updating the compose file:
44+
45+
```sh
46+
docker compose config > compose-stack.yaml
47+
```
48+
49+
### 4. Configure Frontend
50+
51+
Frontend override directory, used to place project-specific frontend configuration files such as `_app.config.js`:
52+
53+
- `/home/docker-compose/bus-override`: bus frontend override directory
54+
- `/home/docker-compose/track-override`: track frontend override directory
55+
56+
**Note**: After modifying the configuration, you need to execute `docker compose up` for the file to be overwritten to `/data/nginx/html/`. Because it uses the overwrite method, it is not recommended to directly modify the files in `/data/nginx/html/`.
57+
58+
### 5. Other optional configurations
59+
60+
- [jtt808 video conversion tool](./jtt808/README.md)
61+
- [Manually download frontend](./scripts/README.md)
62+
63+
### 6. Start
64+
65+
Execute the following command in `/home/docker-compose` to start docker:
66+
67+
```sh
68+
docker compose up
69+
```
70+
71+
### 7. Manage docker-compose directory with git
72+
73+
Execute the following commands in `/home/docker-compose`
74+
75+
```sh
76+
# Switch to the directory
77+
cd /home/docker-compose
78+
79+
# After modifying the configuration each time, remember to back up the configuration to compare the actual impact difference
80+
docker compose config > compose-stack.yaml
81+
82+
# Configure GIT account
83+
git config --global user.name "tg"
84+
git config --global user.email tg@gmail.com
85+
86+
# Initialize GIT
87+
git init
88+
# Add to staging area
89+
git add -A
90+
# Commit local warehouse
91+
git commit -m "Initial commit"
92+
```
93+
94+
## Precautions
95+
96+
### Version management, while iterating the version, remember to synchronize the scripts under mysql
97+
98+
```sh
99+
# bus frontend
100+
BUS_WEB_VERSION=xxx
101+
# bus backend
102+
BUS_GATEWAY_VERSION=xxx
103+
#...
104+
```

README.md

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,104 +1,104 @@
1-
<div align="center"> English | <a href="./README.zh.md">简体中文</a> </div>
1+
<div align="center"> <a href="./README.en.md">English</a> | 简体中文 </div>
22

33
# docker
44

5-
docker configuration repository
5+
docker配置文件仓库
66

7-
## Deployment
7+
## 部署
88

9-
### 1. Initialization
9+
### 1. 初始化
1010

1111
```sh
1212
mkdir -p /home/docker-compose
1313
mkdir /data
1414
git clone https://github.com/TranscodeGroup/docker.git /home/docker
1515
```
1616

17-
### 2. Configure `compose.yaml`
17+
### 2. 配置`compse.yaml`
1818

19-
Create `/home/docker-compose/compose.yaml` file, refer to the following example:
19+
创建`/home/docker-compose/compose.yaml`文件, 参考如下示例:
2020

21-
**Single machine separate deployment**:
21+
**单机单独部署**:
2222

23-
- [bus-http](./examples/bus-http/compose.yaml): Bus http single machine deployment
24-
- [bus-https](./examples/bus-https/compose.yaml): Bus https single machine deployment
25-
- [track-http](./examples/track-http/compose.yaml): Tracker V2 http single machine deployment
26-
- [track-https](./examples/track-https/compose.yaml): Tracker V2 https single machine deployment
23+
- [bus-http](./examples/bus-http/compose.yaml): Bus http单机部署
24+
- [bus-https](./examples/bus-https/compose.yaml): Bus https单机部署
25+
- [track-http](./examples/track-http/compose.yaml): Tracker V2 http单机部署
26+
- [track-https](./examples/track-https/compose.yaml): Tracker V2 https单机部署
2727

28-
**Distributed deployment**:
28+
**分布式部署**:
2929

30-
- [video-storage](./examples/video-storage/compose.yaml): RTP storage
31-
- [video-stream](./examples/video-stream/compose.yaml): RTP video
30+
- [video-storage](./examples/video-storage/compose.yaml): RTP存储
31+
- [video-stream](./examples/video-stream/compose.yaml): RTP视频
3232

33-
### 3. Configure `.env`
33+
### 3. 配置`.env`
3434

35-
Create `/home/docker-compose/.env` file, refer to [.env.default](./.env.default) to override the configuration items that need to be changed.
35+
创建`/home/docker-compose/.env`文件, 参考[.env.default](./.env.default)复写需要改写的配置项.
3636

37-
Execute the following command in `/home/docker-compose` to verify whether all required values used have been set:
37+
`/home/docker-compose`中执行如下命令, 校验所有使用到的必填的值, 是否已经设置:
3838

3939
```sh
4040
docker compose config
4141
```
4242

43-
After passing the verification, execute the following command to export the compose configuration to a file, so as to compare the differences after updating the compose file:
43+
校验通过之后, 执行如下命令, 将compose配置导出成一个文件, 方便在更新compose文件后对比差异:
4444

4545
```sh
4646
docker compose config > compose-stack.yaml
4747
```
4848

49-
### 4. Configure Frontend
49+
### 4. 配置前端
5050

51-
Frontend override directory, used to place project-specific frontend configuration files such as `_app.config.js`:
51+
前端复写目录, 用来放`_app.config.js`等项目特定的前端配置文件:
5252

53-
- `/home/docker-compose/bus-override`: bus frontend override directory
54-
- `/home/docker-compose/track-override`: track frontend override directory
53+
- `/home/docker-compose/bus-override`: bus前端复写目录
54+
- `/home/docker-compose/track-override`: track前端复写目录
5555

56-
**Note**: After modifying the configuration, you need to execute `docker compose up` for the file to be overwritten to `/data/nginx/html/`. Because it uses the overwrite method, it is not recommended to directly modify the files in `/data/nginx/html/`.
56+
**注意**: 修改完配置后, 需要执行`docker compose up`, 文件才会被覆盖到`/data/nginx/html/`里面去. 因为是使用的覆盖的方式, 因此不建议直接修改`/data/nginx/html/`里面的文件.
5757

58-
### 5. Other optional configurations
58+
### 5. 其他可选配置
5959

60-
- [jtt808 video conversion tool](./jtt808/README.md)
61-
- [Manually download frontend](./scripts/README.md)
60+
- [jtt808视频转换工具](./jtt808/README.md)
61+
- [手动下载前端](./scripts/README.md)
6262

63-
### 6. Start
63+
### 6. 启动
6464

65-
Execute the following command in `/home/docker-compose` to start docker:
65+
`/home/docker-compose`中执行如下命令, 启动docker:
6666

6767
```sh
6868
docker compose up
6969
```
7070

71-
### 7. Manage docker-compose directory with git
71+
### 7. 使用git管理docker-compose目录
7272

73-
Execute the following commands in `/home/docker-compose`
73+
`/home/docker-compose`中执行如下命令
7474

7575
```sh
76-
# Switch to the directory
76+
# 切换到目录下面
7777
cd /home/docker-compose
7878

79-
# After modifying the configuration each time, remember to back up the configuration to compare the actual impact difference
79+
# 每次修改配置之后, 记得备份一下配置, 方便对比实际影响差异
8080
docker compose config > compose-stack.yaml
8181

82-
# Configure GIT account
82+
# 配置GIT账号
8383
git config --global user.name "tg"
8484
git config --global user.email tg@gmail.com
8585

86-
# Initialize GIT
86+
# 初始化GIT
8787
git init
88-
# Add to staging area
88+
# 加入暂存区
8989
git add -A
90-
# Commit local warehouse
91-
git commit -m "Initial commit"
90+
# 提交本地仓库
91+
git commit -m "Initial commit(初始化仓库)"
9292
```
9393

94-
## Precautions
94+
## 注意事项
9595

96-
### Version management, while iterating the version, remember to synchronize the scripts under mysql
96+
### 版本管理, 版本迭代同时, 记得同步mysql下面的脚本
9797

9898
```sh
99-
# bus frontend
99+
# bus前端
100100
BUS_WEB_VERSION=xxx
101-
# bus backend
101+
# bus的后端
102102
BUS_GATEWAY_VERSION=xxx
103103
#...
104104
```

README.zh.md

Lines changed: 0 additions & 104 deletions
This file was deleted.

bus/.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../.env.default
1+
../default.env

certbot/.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../.env.default
1+
../default.env
File renamed without changes.

0 commit comments

Comments
 (0)