Skip to content

Commit 6e1b4b7

Browse files
jss-tgipcjs
andauthored
docs: translate documentation and config files to English (#44)
* docs: add english documentation Author: antigravity, jss-tg * wip: sync to en.env --------- Co-authored-by: ipcjs.mac4 <gipcjs@gmail.com>
1 parent 68760e3 commit 6e1b4b7

File tree

31 files changed

+373
-87
lines changed

31 files changed

+373
-87
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 [default.en.env](./default.en.env) 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: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<div align="center"> <a href="./README.en.md">English</a> | 简体中文 </div>
2+
13
# docker
24

35
docker配置文件仓库
@@ -30,7 +32,7 @@ git clone https://github.com/TranscodeGroup/docker.git /home/docker
3032

3133
### 3. 配置`.env`
3234

33-
创建`/home/docker-compose/.env`文件, 参考[.env.default](./.env.default)复写需要改写的配置项.
35+
创建`/home/docker-compose/.env`文件, 参考[default.env](./default.env)复写需要改写的配置项.
3436

3537
`/home/docker-compose`中执行如下命令, 校验所有使用到的必填的值, 是否已经设置:
3638

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

default.en.env

Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
## ================================ Directory ================================
2+
3+
# Data directory, used for storing logs/database/files, etc.
4+
DATA_DIR=/data
5+
# Docker repository directory. It is not recommended to reference the absolute path of the docker repository in the compose file. It is recommended to use configs instead: https://docs.docker.com/reference/compose-file/configs/
6+
DOCKER_DIR=/home/docker
7+
# Project configuration directory
8+
DOCKER_COMPOSE_DIR=/home/docker-compose
9+
# bus frontend file override directory. Files in this directory will be copied to the bus frontend directory when compose is up. Usually, the following files can be overridden:
10+
# - _app.config.js: Frontend configuration file
11+
BUS_WEB_OVERRIDE_DIR=${DOCKER_COMPOSE_DIR}/bus-override
12+
# track frontend file override directory. Files in this directory will be copied to the track frontend directory when compose is up. Usually, the following files can be overridden:
13+
# - _app.config.js: Frontend configuration file
14+
# - index-seo.html: Static page for crawlers (search engine/Line web page abstract, etc.)
15+
# - favicon.ico: ico icon
16+
# - favicon.png: png icon
17+
# - logo.png: Large icon
18+
TRACK_WEB_OVERRIDE_DIR=${DOCKER_COMPOSE_DIR}/track-override
19+
# Absolute path of TOKEN directory, including the following files. The latest server version already supports automatic generation/download of these files:
20+
# - access/ras_key|ras_key.pub: Public/private key pair for access secret
21+
# - refresh/ras_key|ras_key.pub: Public/private key pair for refresh secret
22+
# - ip2region.xdb: ip to region mapping data, manual download link: https://raw.githubusercontent.com/lionsoul2014/ip2region/master/data/ip2region.xdb
23+
MAINTAIN_TOKEN_DIR=${DOCKER_COMPOSE_DIR}/token
24+
# jtt808 optional feature directory, optionally including the following files, see download details: https://github.com/TranscodeGroup/docker/blob/master/jtt808/README.md
25+
# - ffmpeg, ffprobe: FFmpeg bin files
26+
# - ifv2mp4/: Tongli ifv to mp4 tool directory
27+
JTT808_OPT_DIR=${DOCKER_COMPOSE_DIR}/opt
28+
29+
## ================================ Server Info ================================
30+
31+
# Required, current server public IP. If jtt808/video and other services do not set IP, this will be read by default
32+
SERVER_IP_PUBLIC='' # 58.82.168.181
33+
34+
# Current server internal IP, currently no one uses it, can be left blank
35+
# JTT808_HOST/MYSQL_HOST and other variables, single machine deployment can use alias directly (eg: jtt808), intranet multi-server deployment recommends intranet IP, public network deployment uses public IP
36+
SERVER_IP_INTERNAL=''
37+
38+
# Required, server domain name, if there is no domain name, fill in the public IP
39+
SERVER_HOSTNAME='' # livedvr.tripsdd.com
40+
41+
# Required, absolute path of the certificate file, excluding .crt/.key suffix. nginx actually reads the two files ${SSL_CERTIFICATE}.crt and ${SSL_CERTIFICATE}.key
42+
# If using http, or using https but no certificate has been applied for temporarily, it can be set to the built-in fake certificate: /home/docker/nginx/ssl/placeholder
43+
# If using crotbot to automatically apply for a certificate, you need to start it separately first (docker compose up crotbot). The applied certificate path will be printed in the log, and then add it to the variable, generally: /data/certbot/live/${SERVER_HOSTNAME}/certificate,
44+
SSL_CERTIFICATE='' # /home/docker/nginx/ssl/placeholder
45+
46+
# When bus and track are deployed on the same server, they need to be distinguished by domain name
47+
BUS_HOSTNAME=${SERVER_HOSTNAME}
48+
BUS_SSL_CERTIFICATE=${SSL_CERTIFICATE}
49+
TRACK_HOSTNAME=${SERVER_HOSTNAME}
50+
TRACK_SSL_CERTIFICATE=${SSL_CERTIFICATE}
51+
52+
## Frontend Configuration
53+
WEB_PORT_HTTP=80
54+
WEB_PORT_HTTPS=443
55+
# Frontend public URL
56+
# This variable must be filled in when jtt808 and maintain are deployed separately
57+
WEB_BASE_URL='' # https://livedvr.tripsdd.com
58+
59+
# certbot configuration
60+
# Note: After modifying these configurations, you must force recreation (docker compose up --force-recreate certbot) to take effect
61+
#
62+
# DNS resolution provider, common providers are as follows:
63+
# - dnspod: https://console.dnspod.cn/account/token/token
64+
# - cloudflare: https://go-acme.github.io/lego/dns/cloudflare/
65+
# - tencentcloud: https://console.cloud.tencent.com/cam/capi
66+
CERTBOT_DNS_PROVIDER='dnspod'
67+
CERTBOT_DNS_API_KEY='' # Required
68+
# tencentcloud also needs to set this variable extra
69+
CERTBOT_TENCENTCLOUD_SECRET_ID=''
70+
# Email to receive certificate expiration reminder
71+
CERTBOT_EMAIL='transcodegroupdeveloper@gmail.com'
72+
73+
## ================================ Services ================================
74+
75+
## Video Server
76+
# Required, video public IP, APP client and device connection
77+
VIDEO_IP=${SERVER_IP_PUBLIC}
78+
# Required
79+
VIDEO_HOSTNAME=${SERVER_HOSTNAME} # livedvr.tripsdd.com
80+
# Required
81+
VIDEO_SSL_CERTIFICATE=${SSL_CERTIFICATE} # /home/docker/video-nginx/ssl/livedvr_tripsdd_com
82+
83+
# Terminal - Real-time Live Port
84+
VIDEO_PORT_LIVE=9000
85+
# Terminal - Video Playback Port
86+
VIDEO_PORT_RECORD=9001
87+
# Terminal - Intercom
88+
VIDEO_PORT_TALK=9002
89+
# Terminal - Terminal Monitor
90+
VIDEO_PORT_MONITOR=9003
91+
# rtmp port (used by rtp and app)
92+
VIDEO_PORT_RTMP=9005
93+
94+
# HTTPS ports for Frontend and App intercom & flv, currently using 5 ports, supporting more than 30 channels
95+
# Adding ports requires modifying nginx config and docker-compose.yml as well as rtp service mapping
96+
VIDEO_PORT_HTTPS_0=9084 # Recommended 443 or 9084
97+
VIDEO_PORT_HTTPS_1=9085
98+
VIDEO_PORT_HTTPS_2=9086
99+
VIDEO_PORT_HTTPS_3=9087
100+
VIDEO_PORT_HTTPS_4=9088
101+
VIDEO_PORT_HTTPS_5=9089
102+
103+
## Gateway Server
104+
# Required, backend and streaming media services register or issue commands to the gateway server
105+
JTT808_HOST='jtt808'
106+
JTT808_IP=${SERVER_IP_PUBLIC} # Default use server public IP, for device use
107+
JTT808_PORT=9011
108+
JTT808_PORT_HTTP=9012
109+
JTT808_PORT_FILE=9013
110+
JTT808_PORT_FTP=9021
111+
JTT808_PORT_FTP_ACTIVE=9022
112+
JTT808_PORT_FTP_PASSIVE=9041-9049
113+
114+
## maintain
115+
MAINTAIN_HOST='maintain'
116+
MAINTAIN_PORT='8080'
117+
118+
## MYSQL
119+
MYSQL_HOST='mysql8'
120+
MYSQL_PORT=3306
121+
MYSQL_USERNAME='root'
122+
MYSQL_PASSWORD='' # Required
123+
124+
## REDIS
125+
REDIS_HOST='redis'
126+
REDIS_PORT=6379
127+
REDIS_PASSWORD='' # Required
128+
129+
## MongoDB
130+
MONGODB_HOST='mongodb'
131+
MONGODB_PORT=27017
132+
MONGODB_PORT_HTTP=15672
133+
MONGODB_USERNAME='root'
134+
MONGODB_PASSWORD='' # Required
135+
136+
## Rabbitmq
137+
RABBITMQ_HOST='rabbitmq'
138+
RABBITMQ_PORT=5672
139+
RABBITMQ_USERNAME='admin'
140+
RABBITMQ_PASSWORD='' # Required
141+
142+
## Minio
143+
MINIO_HOST='minio'
144+
MINIO_PORT=8000
145+
MINIO_PORT_HTTP=8001
146+
MINIO_USER=minioadmin
147+
MINIO_PASSWORD='' # Required
148+
# MINIO_ACCESSKEY/SECRETKEY, default uses account & password, creating a new set of KEYs in minio management background is also possible
149+
MINIO_ACCESSKEY=${MINIO_USER}
150+
MINIO_SECRETKEY=${MINIO_PASSWORD}
151+
# MINIO ftp feature
152+
MINIO_FTP_PORT=8021
153+
MINIO_FTP_PASSIVE_PORT=8523-8529
154+
155+
## Email
156+
# Default uses transcodegroup email
157+
MAIL_HOST=smtp.transcodegroup.com
158+
MAIL_USERNAME=bus@transcodegroup.com
159+
# Required, need to create password in enterprise email
160+
MAIL_PASSWORD=''
161+
162+
## ================================ Version, set to latest to use the latest version ================================
163+
164+
# bus, version check date: 2025-12-31
165+
# bus frontend
166+
BUS_WEB_VERSION=5.33.0
167+
# bus backend
168+
BUS_GATEWAY_VERSION=1.25.0
169+
# bus 808-2019 version
170+
BUS_GATEWAY_808_2019_VERSION=25.8.25
171+
# bus active safety version
172+
BUS_GATEWAY_JSATL12_VERSION=23.1.21
173+
174+
# track, version check date: 2026-1-21
175+
# track frontend
176+
TRACK_WEB_VERSION=1.65.1
177+
# track backend
178+
TRACK_MAINTAIN_VERSION=1.58.1
179+
# track gateway
180+
TRACK_JTT808_VERSION=1.26.1
File renamed without changes.

examples/bus-http/.env

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
#---------服务器信息, 必须按实际服务器信息填写-----------------
2-
## HOSTNAME 没有用公网IP替代
1+
#---------Server Info, must be filled in according to actual server info-----------------
2+
## HOSTNAME, use public IP if no domain
33
SERVER_HOSTNAME='transcodegroup.cn'
4-
## 公网IP
4+
## Public IP
55
SERVER_IP_PUBLIC='81.71.36.80'
6-
# 即使不使用https, 也要配置一个占位证书
6+
# Must configure a placeholder certificate even if not using https
77
SSL_CERTIFICATE=/home/docker/nginx/ssl/placeholder
88

9-
#---------自定义初始密码, 建议随机生成新的替换-------------
10-
## MYSQL, 必填,示例: p92oVkNxrUttUUu8qyqs
9+
#---------Custom Initial Password, recommended to generate new random ones for replacement-------------
10+
## MYSQL, Required, example: p92oVkNxrUttUUu8qyqs
1111
MYSQL_PASSWORD='p92oVkNxrUttUUu8qyqs'
12-
## redis初始密码, 示例: nse3fLtG4Bm53URq4Ex
12+
## redis initial password, example: nse3fLtG4Bm53URq4Ex
1313
REDIS_PASSWORD='p92oVkNxrUttUUu8qyqs'
14-
## rabbitMq初始密码, 示例: Prr1139gdGhMJ4RDo7Gt
14+
## rabbitMq initial password, example: Prr1139gdGhMJ4RDo7Gt
1515
RABBITMQ_PASSWORD='p92oVkNxrUttUUu8qyqs'
16-
## Email密码, 示例ZfJwfEJvL8wbPr4LvCyx
16+
## Email password, example ZfJwfEJvL8wbPr4LvCyx
1717
MAIL_PASSWORD='p92oVkNxrUttUUu8qyqs'
1818

19-
#----------自定义端口信息, 推荐开放9000~9100,443,80--------
20-
# nginx前端配置
19+
#----------Custom Port Info, recommend opening 9000~9100, 443, 80--------
20+
# nginx frontend configuration
2121
WEB_PORT_HTTP=9080

examples/bus-http/compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Bus单机部署, 使用http
1+
# Bus single machine deployment, using http
22
include:
33
- ../docker/mysql8/compose.yml
44
- ../docker/mysql-backup/compose.cbus.yml

examples/bus-https/.env

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
##---------服务器信息, 必须按实际服务器信息填写-----------------
2-
# 公网IP
1+
##---------Server Info, must be filled in according to actual server info-----------------
2+
# Public IP
33
SERVER_IP_PUBLIC='81.71.36.80'
4-
# HOSTNAME 没有用域名IP替代
4+
# HOSTNAME, use public IP if no domain
55
SERVER_HOSTNAME='transcodegroup.cn'
6-
# 自动申请的SSL证书
6+
# Automatically applied SSL certificate
77
SSL_CERTIFICATE="/data/certbot/live/${SERVER_HOSTNAME}/certificate"
8-
# dnspod的api key, 由id和token拼接而成: https://console.dnspod.cn/account/token/token
8+
# dnspod api key, formed by splicing id and token: https://console.dnspod.cn/account/token/token
99
CERTBOT_DNS_API_KEY='id,token'
1010

11-
##---------自定义初始密码, 建议随机生成新的替换-------------
12-
# MYSQL, 必填
11+
##---------Custom Initial Password, recommended to generate new random ones for replacement-------------
12+
# MYSQL, Required
1313
MYSQL_PASSWORD='ZfJwfEJvL8wbPr4LvCyx'
14-
# REDIS, 必填
14+
# REDIS, Required
1515
REDIS_PASSWORD='ZfJwfEJvL8wbPr4LvCyx'
16-
# RABBIT_MQ, 必填
16+
# RABBIT_MQ, Required
1717
RABBITMQ_PASSWORD='ZfJwfEJvL8wbPr4LvCyx'
18-
# Email,必填
18+
# Email, Required
1919
MAIL_PASSWORD='ZfJwfEJvL8wbPr4LvCyx'
2020

21-
##----------自定义端口信息, 推荐开放9000~9100,443,80--------
22-
# 前端端口配置, HTTP默认80, HTTPS默认443
21+
##----------Custom Port Info, recommend opening 9000~9100, 443, 80--------
22+
# Frontend port configuration, HTTP default 80, HTTPS default 443
2323
WEB_PORT_HTTP=9070
2424
WEB_PORT_HTTPS=9080

examples/bus-https/compose.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Bus单机部署, 使用https
2-
# 密码/端口/域名等信息在.env文件中配置
1+
# Bus single machine deployment, using https
2+
# Passwords/ports/domain names and other information are configured in the .env file
33
include:
44
- ../docker/mysql8/compose.yml
55
- ../docker/mysql-backup/compose.cbus.yml

0 commit comments

Comments
 (0)