|
1 | | -<div align="center"> English | <a href="./README.zh.md">简体中文</a> </div> |
| 1 | +<div align="center"> <a href="./README.en.md">English</a> | 简体中文 </div> |
2 | 2 |
|
3 | 3 | # docker |
4 | 4 |
|
5 | | -docker configuration repository |
| 5 | +docker配置文件仓库 |
6 | 6 |
|
7 | | -## Deployment |
| 7 | +## 部署 |
8 | 8 |
|
9 | | -### 1. Initialization |
| 9 | +### 1. 初始化 |
10 | 10 |
|
11 | 11 | ```sh |
12 | 12 | mkdir -p /home/docker-compose |
13 | 13 | mkdir /data |
14 | 14 | git clone https://github.com/TranscodeGroup/docker.git /home/docker |
15 | 15 | ``` |
16 | 16 |
|
17 | | -### 2. Configure `compose.yaml` |
| 17 | +### 2. 配置`compse.yaml` |
18 | 18 |
|
19 | | -Create `/home/docker-compose/compose.yaml` file, refer to the following example: |
| 19 | +创建`/home/docker-compose/compose.yaml`文件, 参考如下示例: |
20 | 20 |
|
21 | | -**Single machine separate deployment**: |
| 21 | +**单机单独部署**: |
22 | 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 |
| 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单机部署 |
27 | 27 |
|
28 | | -**Distributed deployment**: |
| 28 | +**分布式部署**: |
29 | 29 |
|
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视频 |
32 | 32 |
|
33 | | -### 3. Configure `.env` |
| 33 | +### 3. 配置`.env` |
34 | 34 |
|
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)复写需要改写的配置项. |
36 | 36 |
|
37 | | -Execute the following command in `/home/docker-compose` to verify whether all required values used have been set: |
| 37 | +在`/home/docker-compose`中执行如下命令, 校验所有使用到的必填的值, 是否已经设置: |
38 | 38 |
|
39 | 39 | ```sh |
40 | 40 | docker compose config |
41 | 41 | ``` |
42 | 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: |
| 43 | +校验通过之后, 执行如下命令, 将compose配置导出成一个文件, 方便在更新compose文件后对比差异: |
44 | 44 |
|
45 | 45 | ```sh |
46 | 46 | docker compose config > compose-stack.yaml |
47 | 47 | ``` |
48 | 48 |
|
49 | | -### 4. Configure Frontend |
| 49 | +### 4. 配置前端 |
50 | 50 |
|
51 | | -Frontend override directory, used to place project-specific frontend configuration files such as `_app.config.js`: |
| 51 | +前端复写目录, 用来放`_app.config.js`等项目特定的前端配置文件: |
52 | 52 |
|
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前端复写目录 |
55 | 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/`. |
| 56 | +**注意**: 修改完配置后, 需要执行`docker compose up`, 文件才会被覆盖到`/data/nginx/html/`里面去. 因为是使用的覆盖的方式, 因此不建议直接修改`/data/nginx/html/`里面的文件. |
57 | 57 |
|
58 | | -### 5. Other optional configurations |
| 58 | +### 5. 其他可选配置 |
59 | 59 |
|
60 | | -- [jtt808 video conversion tool](./jtt808/README.md) |
61 | | -- [Manually download frontend](./scripts/README.md) |
| 60 | +- [jtt808视频转换工具](./jtt808/README.md) |
| 61 | +- [手动下载前端](./scripts/README.md) |
62 | 62 |
|
63 | | -### 6. Start |
| 63 | +### 6. 启动 |
64 | 64 |
|
65 | | -Execute the following command in `/home/docker-compose` to start docker: |
| 65 | +在`/home/docker-compose`中执行如下命令, 启动docker: |
66 | 66 |
|
67 | 67 | ```sh |
68 | 68 | docker compose up |
69 | 69 | ``` |
70 | 70 |
|
71 | | -### 7. Manage docker-compose directory with git |
| 71 | +### 7. 使用git管理docker-compose目录 |
72 | 72 |
|
73 | | -Execute the following commands in `/home/docker-compose` |
| 73 | +在`/home/docker-compose`中执行如下命令 |
74 | 74 |
|
75 | 75 | ```sh |
76 | | -# Switch to the directory |
| 76 | +# 切换到目录下面 |
77 | 77 | cd /home/docker-compose |
78 | 78 |
|
79 | | -# After modifying the configuration each time, remember to back up the configuration to compare the actual impact difference |
| 79 | +# 每次修改配置之后, 记得备份一下配置, 方便对比实际影响差异 |
80 | 80 | docker compose config > compose-stack.yaml |
81 | 81 |
|
82 | | -# Configure GIT account |
| 82 | +# 配置GIT账号 |
83 | 83 | git config --global user.name "tg" |
84 | 84 | git config --global user.email tg@gmail.com |
85 | 85 |
|
86 | | -# Initialize GIT |
| 86 | +# 初始化GIT |
87 | 87 | git init |
88 | | -# Add to staging area |
| 88 | +# 加入暂存区 |
89 | 89 | git add -A |
90 | | -# Commit local warehouse |
91 | | -git commit -m "Initial commit" |
| 90 | +# 提交本地仓库 |
| 91 | +git commit -m "Initial commit(初始化仓库)" |
92 | 92 | ``` |
93 | 93 |
|
94 | | -## Precautions |
| 94 | +## 注意事项 |
95 | 95 |
|
96 | | -### Version management, while iterating the version, remember to synchronize the scripts under mysql |
| 96 | +### 版本管理, 版本迭代同时, 记得同步mysql下面的脚本 |
97 | 97 |
|
98 | 98 | ```sh |
99 | | -# bus frontend |
| 99 | +# bus前端 |
100 | 100 | BUS_WEB_VERSION=xxx |
101 | | -# bus backend |
| 101 | +# bus的后端 |
102 | 102 | BUS_GATEWAY_VERSION=xxx |
103 | 103 | #... |
104 | 104 | ``` |
0 commit comments