Skip to content

Commit 94a1517

Browse files
xiaorongniecliipcjs
authored
feat: 数据库脚本和数据分开 & 锁定前后端版本号 (#20)
* feat(V2): 数据库脚本和数据分开创建 * feat(V2脚本): 更新最新表结构 * wip: 移除没用的emoji * wip: 恢复cbus和gps表 * wip: cbus和gps也拆分成init-table & init-data * wip: 将bus和track相关docker的版本在env文件中锁定 * wip: 添加DOCKER_DIR变量 更新注释 * wip: 添加前端版本号 * wip: update download script --------- Co-authored-by: cli <cli@debian> Co-authored-by: ipcjs.mac4 <[email protected]>
1 parent ca96d14 commit 94a1517

File tree

14 files changed

+14008
-14789
lines changed

14 files changed

+14008
-14789
lines changed

.env.default

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ SERVER_IP_INTERNAL='' # 127.0.0.1
66
# 服务器域名
77
SERVER_HOSTNAME='' # livedvr.tripsdd.com
88
SSL_CERTIFICATE='' # /home/docker-compose/ssl/livedvr_tripsdd_com
9-
# 数据目录
10-
DATA_DIR=/data
119

1210
# bus和track部署在同一台服务器上时, 需要通过域名区分两者
1311
BUS_HOSTNAME=${SERVER_HOSTNAME}
@@ -16,14 +14,35 @@ TRACK_HOSTNAME=${SERVER_HOSTNAME}
1614
TRACK_SSL_CERTIFICATE=${SSL_CERTIFICATE}
1715

1816
#---------------------------------------------
19-
# 前端配置
17+
## 前端配置
2018
WEB_PORT_HTTP=80
2119
WEB_PORT_HTTPS=443
2220
WEB_BASE_URL='' # https://livedvr.tripsdd.com
2321
#---------------------------------------------
2422

23+
## 目录
24+
# 数据目录, 用于存放日志/数据库/文件等
25+
DATA_DIR=/data
26+
# docker仓库的目录, 不建议在compose文件中引用docker仓库的绝对路径, 建议使用configs替代: https://docs.docker.com/reference/compose-file/configs/
27+
DOCKER_DIR=/home/docker
28+
29+
## 版本号, 设为latest则使用最新版
30+
# bus前端版本
31+
BUS_WEB_VERSION=5.30.0
32+
# bus的后端, gateway-web和gateway-dispatch共用一个版本号
33+
BUS_GATEWAY_VERSION=1.21.1
34+
BUS_GATEWAY_808_2019_VERSION=25.8.25
35+
BUS_GATEWAY_JSATL12_VERSION=23.1.21
36+
BUS_GATEWAY_CALCULATION_VERSION=1.17.0
37+
# track前端版本
38+
TRACK_WEB_VERSION=1.53.0
39+
TRACK_MAINTAIN_VERSION=1.45.0
40+
TRACK_JTT808_VERSION=1.18.0
41+
42+
# ---------------------------------------------
43+
2544
## 视频服务器
26-
# 必填, 视频外网IP, APP客户端和设备连接
45+
# 必填, 视频外网IP, APP客户端和设备连接
2746
VIDEO_IP=${SERVER_IP_PUBLIC}
2847
# 必填
2948
VIDEO_HOSTNAME=${SERVER_HOSTNAME} # livedvr.tripsdd.com
@@ -53,12 +72,9 @@ VIDEO_PORT_HTTPS_5=9089
5372
#---------------------------------------------
5473

5574
## 网关服务器
56-
5775
# 必填, 后端和流媒体服务往网关服务器注册或者下发指令
5876
# 单机部署推荐别名jtt808,内网多服务器部署推荐内网IP, 外网部署使用外网IP
5977
JTT808_HOST='jtt808' # jtt808 | ${SERVER_IP_INTERNAL} | ${SERVER_IP_PUBLIC}
60-
61-
## 808网关
6278
JTT808_IP=${SERVER_IP_PUBLIC} # 默认使用服务器外网IP,设备使用
6379
JTT808_PORT=9011
6480
JTT808_PORT_HTTP=9012

bus/compose.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
services:
22
gateway_808_2019:
3-
image: transcodegroup/gateway-808-2019:latest
3+
image: transcodegroup/gateway-808-2019:${BUS_GATEWAY_808_2019_VERSION:?required}
44
container_name: gateway_808_2019
55
restart: always
66
volumes:
@@ -53,7 +53,7 @@ services:
5353

5454
# spring-boot后端
5555
gateway_web:
56-
image: transcodegroup/gateway-web
56+
image: transcodegroup/gateway-web:${BUS_GATEWAY_VERSION:?required}
5757
container_name: gateway_web
5858
restart: always
5959
volumes:
@@ -104,7 +104,7 @@ services:
104104

105105
# spring-boot调度
106106
gateway_dispatch:
107-
image: transcodegroup/gateway-dispatch
107+
image: transcodegroup/gateway-dispatch:${BUS_GATEWAY_VERSION:?required}
108108
container_name: gateway_dispatch
109109
restart: always
110110
volumes:
@@ -152,7 +152,7 @@ services:
152152
max-size: "100m"
153153
# 主动安全
154154
gateway_jsatl12:
155-
image: transcodegroup/gateway-jsatl12
155+
image: transcodegroup/gateway-jsatl12:${BUS_GATEWAY_JSATL12_VERSION:?required}
156156
container_name: gateway_jsatl12
157157
restart: always
158158
ports:
@@ -178,7 +178,7 @@ services:
178178
# 限制日志文件大小
179179
max-size: "100m"
180180
gateway_calculation:
181-
image: transcodegroup/gateway-calculation
181+
image: transcodegroup/gateway-calculation:${BUS_GATEWAY_CALCULATION_VERSION:?required}
182182
container_name: gateway_calculation
183183
restart: always
184184
volumes:

jtt808/compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
services:
22
jtt808:
3-
image: transcodegroup/jtt808-server:latest
3+
image: transcodegroup/jtt808-server:${TRACK_JTT808_VERSION:?required}
44
container_name: jtt808_server
55
restart: always
66
ports:

maintain/compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
services:
22
maintain:
3-
image: transcodegroup/maintain-server
3+
image: transcodegroup/maintain-server:${TRACK_MAINTAIN_VERSION:?required}
44
container_name: maintain
55
restart: always
66
volumes:
77
- /etc/localtime:/etc/localtime
8-
- ${MAINTAIN_TOKEN_DIR:-/home/docker-compose/token}:/home/token
8+
- ${MAINTAIN_TOKEN_DIR:?required}:/home/token
99
- ${DATA_DIR:-/data}/logs/maintain:/logs
1010
- ${DATA_DIR:-/data}/fonts:/data/fonts
1111
ports:
Lines changed: 3919 additions & 4327 deletions
Large diffs are not rendered by default.

mysql8/initdb/02-maintain-init-data.sql

Lines changed: 201 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 8463 additions & 9562 deletions
Large diffs are not rendered by default.

mysql8/initdb/04-cbus-init-data.sql

Lines changed: 510 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 873 additions & 873 deletions
Large diffs are not rendered by default.

projects/teamcity-download-artifact.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ print_help() {
1212
echo "Usage: $bin_name --build=<build> [--tag=<tag>]"
1313
echo
1414
echo "--build: 构建的名称, 例如: MaintainVbenAdmin_Release, 必填"
15-
echo "--tag: 标签名, 若不填, 则下载最后一次的构建"
15+
echo "--tag: 标签名, 默认为latest, 下载最后一次的构建"
1616
echo
1717
echo "示例:"
1818
echo
@@ -41,7 +41,7 @@ if [ -z "$BUILD" ]; then
4141
exit 1
4242
fi
4343

44-
if [ -n "$TAG" ]; then
44+
if [ -n "$TAG" ] && [ "$TAG" != "latest" ]; then
4545
# locator的value包含`/`时, 需要进行base64编码
4646
# @see https://www.jetbrains.com/help/teamcity/rest/locators.html#e20589c5
4747
encoded_tag="$(printf '%s' "tags/$TAG" | base64)"

0 commit comments

Comments
 (0)