-
Notifications
You must be signed in to change notification settings - Fork 0
feat(公交https): 新增公交https一键部署demo, 移除mysql5.7 #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
2b6f77d
feat(公交https): 新增公交https一键部署demo
xiaorongnie 059df56
feat(env说明): 增加说明
xiaorongnie c724c61
feat(analytics): 增加库
xiaorongnie 9af1af9
feat(bus-http): 修改http的demo, 保持docker-compose的目录
xiaorongnie 7958f6a
feat(mysql5.7): 移除, 全部迁入mysql8
xiaorongnie 546ef3d
feat(公交脚本): 更新公交最新脚本
xiaorongnie a9c64bc
feat(bus-http): 增加默认值,方便本机一键启动
xiaorongnie 3f705e6
feat(字符集): 统一成mysql8的默认字符集
xiaorongnie d98dabd
feat(分区): 删除cbus的device*库, 初始化立即调用分区
xiaorongnie eeab248
feat(版本更新): 公交前后端更新到2025-11-06最新版本
xiaorongnie 49c0cda
feat(公交计算): 移除掉公交计算服务
xiaorongnie 909b23a
feat(证书): 只保留空结构
xiaorongnie 7e40f8d
feat(默认配置): 修改成空+示例
xiaorongnie 11b4f28
feat(rtp): 增加https方式, 对齐服务
xiaorongnie 199d4a4
fix(文件路径): 下面有引用, 放最顶部
xiaorongnie d2432d2
feat(bus-nginx): http模式空占位
xiaorongnie 077e15f
feat(track-nginx): 增加http的证书占位
xiaorongnie 35d2a53
feat(readme): 增加git管理要求
xiaorongnie 8aaf349
wip: example的变量填写默认值 & 目录全部写到一起
ipcjs 96e2185
docs: 手动下载前端的文档, 移到projects/下
ipcjs 43329d1
refactor: projects -> scripts
ipcjs 90c67a3
feat: 修改部署和版本更新readme
xiaorongnie 2170704
feat(track-https): 修改https规范
xiaorongnie d748c81
feat(设备表): 版本号改到256, 兼容通力
xiaorongnie bcdca79
feat(readme): 只保留参考
xiaorongnie 794df7d
wip: 添加"配置前端"
ipcjs 5448548
wip: xx
ipcjs 30be693
wip: 推荐安装docker扩展等
ipcjs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,29 @@ | ||
| ## ================================ 目录 ================================ | ||
|
|
||
| # 数据目录, 用于存放日志/数据库/文件等 | ||
| DATA_DIR=/data | ||
| # docker仓库的目录, 不建议在compose文件中引用docker仓库的绝对路径, 建议使用configs替代: https://docs.docker.com/reference/compose-file/configs/ | ||
| DOCKER_DIR=/home/docker | ||
| # 实际配置项目配置目录 | ||
| DOCKER_COMPOSE_DIR=/home/docker-compose | ||
| # bus前端文件复写目录, 该目录中的文件会在compose被up时被复制到bus前端目录, 通常可以复写如下文件: | ||
| # - _app.config.js: 前端配置文件 | ||
| BUS_WEB_OVERRIDE_DIR=${DOCKER_COMPOSE_DIR}/bus-override | ||
| # track前端文件复写目录, 该目录中的文件会在compose被up时被复制到track前端目录, 通常可以复写如下文件: | ||
| # - _app.config.js: 前端配置文件 | ||
| # - index-seo.html: 交给爬虫(搜索引擎/Line网页摘要等)读取的静态页面 | ||
| # - favicon.ico: ico图标 | ||
| # - favicon.png: png图标 | ||
| # - logo.png: 大图标 | ||
| TRACK_WEB_OVERRIDE_DIR=${DOCKER_COMPOSE_DIR}/track-override | ||
| # TOKEN目录的绝对路径, 包含以下文件, 最新版服务器已经支持自动生成/下载这些文件: | ||
| # - access/ras_key|ras_key.pub: 访问密钥的公私钥对 | ||
| # - refresh/ras_key|ras_key.pub: 刷新密钥的公私钥对 | ||
| # - ip2region.xdb: ip到区域的映射数据, 手动下载连接: https://raw.githubusercontent.com/lionsoul2014/ip2region/master/data/ip2region.xdb | ||
| MAINTAIN_TOKEN_DIR=${DOCKER_COMPOSE_DIR}/token | ||
|
|
||
| ## ================================ 服务器信息 ================================ | ||
|
|
||
| # 必填, 当前服务器公网IP, jtt808/video等服务不设置IP的时候,默认会读取这个 | ||
| SERVER_IP_PUBLIC='' # 58.82.168.181 | ||
|
|
||
|
|
@@ -8,8 +34,8 @@ SERVER_IP_INTERNAL='' | |
| # 必填, 服务器域名, 若没有域名, 则填写公网IP | ||
| SERVER_HOSTNAME='' # livedvr.tripsdd.com | ||
|
|
||
| # 必填, 证书文件的绝对路径, 排除.crt/.key后缀, nginx实际读取的是 ${SSL_CERTIFICATE}.crt 和 ${SSL_CERTIFICATE}.key 两个文件 | ||
| # 即使不使用https或者暂时没申请到证书, 也要配置该变量, 否则nginx会报错, 可以直接使用examples里面的假证书: /home/docker/examples/track/ssl/certificate | ||
| # 使用https时, 必填, 证书文件的绝对路径, 排除.crt/.key后缀, nginx实际读取的是 ${SSL_CERTIFICATE}.crt 和 ${SSL_CERTIFICATE}.key 两个文件 | ||
| # 如果暂时没有申请到证书, 可以使用内置的假证书: /home/docker/nginx/ssl/placeholder | ||
| SSL_CERTIFICATE='' # /home/docker-compose/ssl/livedvr_tripsdd_com | ||
|
|
||
| # bus和track部署在同一台服务器上时, 需要通过域名区分两者 | ||
|
|
@@ -18,47 +44,14 @@ BUS_SSL_CERTIFICATE=${SSL_CERTIFICATE} | |
| TRACK_HOSTNAME=${SERVER_HOSTNAME} | ||
| TRACK_SSL_CERTIFICATE=${SSL_CERTIFICATE} | ||
|
|
||
| #--------------------------------------------- | ||
| ## 前端配置 | ||
| WEB_PORT_HTTP=80 | ||
| WEB_PORT_HTTPS=443 | ||
| # 前端的公网URL | ||
| # jtt808和maintain分开部署时, 必须填写这个变量 | ||
| WEB_BASE_URL='' # https://livedvr.tripsdd.com | ||
| #--------------------------------------------- | ||
|
|
||
| ## 目录 | ||
| # 数据目录, 用于存放日志/数据库/文件等 | ||
| DATA_DIR=/data | ||
| # docker仓库的目录, 不建议在compose文件中引用docker仓库的绝对路径, 建议使用configs替代: https://docs.docker.com/reference/compose-file/configs/ | ||
| DOCKER_DIR=/home/docker | ||
| DOCKER_COMPOSE_DIR=/home/docker-compose | ||
|
|
||
| ## 版本号, 设为latest则使用最新版 | ||
| # bus前端版本 | ||
| BUS_WEB_VERSION=5.30.0 | ||
| # bus前端文件复写目录, 该目录中的文件会在compose被up时被复制到bus前端目录, 通常可以复写如下文件: | ||
| # - _app.config.js: 前端配置文件 | ||
| BUS_WEB_OVERRIDE_DIR=${DOCKER_COMPOSE_DIR}/bus-override | ||
| # bus的后端, gateway-web和gateway-dispatch共用一个版本号 | ||
| BUS_GATEWAY_VERSION=1.21.1 | ||
| BUS_GATEWAY_808_2019_VERSION=25.8.25 | ||
| BUS_GATEWAY_JSATL12_VERSION=23.1.21 | ||
| BUS_GATEWAY_CALCULATION_VERSION=1.17.0 | ||
|
|
||
| # track前端版本 | ||
| TRACK_WEB_VERSION=1.53.0 | ||
| # track前端文件复写目录, 该目录中的文件会在compose被up时被复制到track前端目录, 通常可以复写如下文件: | ||
| # - _app.config.js: 前端配置文件 | ||
| # - index-seo.html: 交给爬虫(搜索引擎/Line网页摘要等)读取的静态页面 | ||
| # - favicon.ico: ico图标 | ||
| # - favicon.png: png图标 | ||
| # - logo.png: 大图标 | ||
| TRACK_WEB_OVERRIDE_DIR=${DOCKER_COMPOSE_DIR}/track-override | ||
| TRACK_MAINTAIN_VERSION=1.45.0 | ||
| TRACK_JTT808_VERSION=1.18.0 | ||
|
|
||
| # --------------------------------------------- | ||
| ## ================================ Services ================================ | ||
|
|
||
| ## 视频服务器 | ||
| # 必填, 视频公网IP, APP客户端和设备连接 | ||
|
|
@@ -88,8 +81,6 @@ VIDEO_PORT_HTTPS_3=9087 | |
| VIDEO_PORT_HTTPS_4=9088 | ||
| VIDEO_PORT_HTTPS_5=9089 | ||
|
|
||
| #--------------------------------------------- | ||
|
|
||
| ## 网关服务器 | ||
| # 必填, 后端和流媒体服务往网关服务器注册或者下发指令 | ||
| JTT808_HOST='jtt808' | ||
|
|
@@ -101,16 +92,9 @@ JTT808_PORT_FTP=9021 | |
| JTT808_PORT_FTP_ACTIVE=9022 | ||
| JTT808_PORT_FTP_PASSIVE=9041-9049 | ||
|
|
||
| #--------------------------------------------- | ||
|
|
||
| ## maintain | ||
| MAINTAIN_HOST='maintain' | ||
| MAINTAIN_PORT='8080' | ||
| # TOKEN目录的绝对路径, 包含以下文件, 最新版服务器已经支持自动生成/下载这些文件: | ||
| # - access/ras_key|ras_key.pub: 访问密钥的公私钥对 | ||
| # - refresh/ras_key|ras_key.pub: 刷新密钥的公私钥对 | ||
| # - ip2region.xdb: ip到区域的映射数据, 手动下载连接: https://raw.githubusercontent.com/lionsoul2014/ip2region/master/data/ip2region.xdb | ||
| MAINTAIN_TOKEN_DIR=${DOCKER_COMPOSE_DIR}/token | ||
|
|
||
| ## MYSQL | ||
| MYSQL_HOST='mysql8' | ||
|
|
@@ -148,11 +132,27 @@ MINIO_SECRETKEY=${MINIO_PASSWORD} | |
| # MINIO ftp功能 | ||
| MINIO_FTP_PORT=8021 | ||
| MINIO_FTP_PASSIVE_PORT=8523-8529 | ||
| #--------------------------------------------- | ||
|
|
||
| ## 邮件 | ||
| # 默认使用transcodegroup的邮箱 | ||
| MAIL_HOST=smtp.transcodegroup.com | ||
| [email protected] | ||
| # 必填, 需要去企业邮箱中创建密码 | ||
| MAIL_PASSWORD='' | ||
|
|
||
| ## ================================ 版本号, 设为latest则使用最新版 ================================ | ||
|
|
||
| # bus前端 | ||
| BUS_WEB_VERSION=5.31.0 | ||
| # bus的后端 | ||
| BUS_GATEWAY_VERSION=1.23.0 | ||
| # 公交808-2019版本号 | ||
| BUS_GATEWAY_808_2019_VERSION=25.8.25 | ||
| # 公交主动安全版本号 | ||
| BUS_GATEWAY_JSATL12_VERSION=23.1.21 | ||
|
|
||
| # track前端 | ||
| TRACK_WEB_VERSION=1.53.0 | ||
| # track后端 | ||
| TRACK_MAINTAIN_VERSION=1.45.0 | ||
| TRACK_JTT808_VERSION=1.18.0 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,4 +4,4 @@ ip2region.xdb | |
| /.env | ||
| /.env.local | ||
| /tmp | ||
| /projects/*.zip | ||
| /scripts/*.zip | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "recommendations": [ | ||
| "docker.docker" | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "cSpell.words": [ | ||
| "RABBITMQ" | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,11 +16,16 @@ git clone https://github.com/TranscodeGroup/docker.git /home/docker | |
|
|
||
| 创建`/home/docker-compose/compose.yaml`文件, 参考如下示例: | ||
|
|
||
| **单机单独部署**: | ||
|
|
||
| - [bus-http](./examples/bus-http/compose.yaml): Bus-http单机部署 | ||
| - [bus-https](./examples/bus-https/compose.yaml): Bus-https单机部署 | ||
| - [track-https](./examples/track-https/compose.yaml): Tracker V2单机部署 | ||
|
|
||
| **分布式部署**: | ||
|
|
||
| - [video-storage](./examples/video-storage/compose.yaml): RTP存储 | ||
| - [video-stream](./examples/video-stream/compose.yaml): RTP视频 | ||
| - [track](./examples/track/compose.yaml): Tracker V2单机部署 | ||
| - [bus](./examples/bus/compose.yaml): Bus单机部署 | ||
| - etc. | ||
|
|
||
| ### 3. 配置`.env` | ||
|
|
||
|
|
@@ -38,48 +43,54 @@ docker compose config | |
| docker compose config > compose-stack.yaml | ||
| ``` | ||
|
|
||
| ### 4. 下载前端文件 | ||
|
|
||
| #### 使用Docker自动下载 | ||
| ### 4. 配置前端 | ||
|
|
||
| 在`/home/docker-compose/compose.yaml`文件中, `include`如下服务, 即可自动下载前端: | ||
| 前端复写目录, 用来放`_app.config.js`等项目特定的前端配置文件: | ||
|
|
||
| ```yaml | ||
| include: | ||
| # ... | ||
| - path: | ||
| - ../docker/web-downloader/compose.yml # 自动下载的基础配置 | ||
| - ../docker/web-downloader/compose.track.yml # 自动下载track, 可选 | ||
| - ../docker/web-downloader/compose.bus.yml # 自动下载bus, 可选 | ||
| ``` | ||
| - `/home/docker-compose/bus-override`: bus前端复写目录 | ||
| - `/home/docker-compose/track-override`: track前端复写目录 | ||
|
|
||
| #### 手动下载 | ||
| **注意**: 修改完配置后, 需要执行`docker compose up`, 文件才会被覆盖到`/data/nginx/html/`里面去. 因为是使用的覆盖的方式, 因此不建议直接修改`/data/nginx/html/`里面的文件. | ||
|
|
||
| 部署distar等项目的前端: | ||
| [说明文件](projects/README.md) | ||
| ### 5. 启动 | ||
|
|
||
| 下载并提取最新的`bus`前端: | ||
| 在`/home/docker-compose`中执行如下命令, 启动docker: | ||
|
|
||
| ```sh | ||
| cd /data/nginx/html | ||
| /home/docker/projects/teamcity-download-artifact.sh --build=CityBusVueAdmin_Release | ||
| unzip CityBusVueAdmin_Release-latest.zip | ||
| unzip bus.zip -d bus | ||
| docker compose up | ||
| ``` | ||
|
|
||
| 下载并提取最新的`track`前端: | ||
| ### 6. 使用git管理docker-compose目录 | ||
|
|
||
| 在`/home/docker-compose`中执行如下命令 | ||
|
|
||
| ```sh | ||
| cd /data/nginx/html | ||
| /home/docker/projects/teamcity-download-artifact.sh --build=MaintainVbenAdmin_Release | ||
| unzip MaintainVbenAdmin_Release-latest.zip | ||
| unzip maintain.zip -d track | ||
| # 切换到目录下面 | ||
| cd /home/docker-compose | ||
|
|
||
| # 每次修改配置之后, 记得备份一下配置, 方便对比实际影响差异 | ||
| docker compose config > compose-stack.yaml | ||
|
|
||
| # 配置GIT账号 | ||
| git config --global user.name "tg" | ||
| git config --global user.email [email protected] | ||
|
|
||
| # 初始化GIT | ||
| git init | ||
| # 加入暂存区 | ||
| git add -A | ||
| # 提交本地仓库 | ||
| git commit -m "Initial commit(初始化仓库)" | ||
| ``` | ||
|
|
||
| ### 5. 启动 | ||
| ## 注意事项 | ||
|
|
||
| 在`/home/docker-compose`中执行如下命令, 启动docker: | ||
| ### 版本管理, 版本迭代同时, 记得同步mysql下面的脚本 | ||
|
|
||
| ```sh | ||
| docker compose up | ||
| # bus前端 | ||
| BUS_WEB_VERSION=xxx | ||
| # bus的后端 | ||
| BUS_GATEWAY_VERSION=xxx | ||
| #... | ||
| ``` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xiaorongnie marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| #---------服务器信息, 必须按实际服务器信息填写----------------- | ||
| ## HOSTNAME 没有用公网IP替代 | ||
| SERVER_HOSTNAME='transcodegroup.cn' | ||
| ## 公网IP | ||
| SERVER_IP_PUBLIC='81.71.36.80' | ||
|
|
||
| #---------自定义初始密码, 建议随机生成新的替换------------- | ||
| ## MYSQL, 必填,示例: p92oVkNxrUttUUu8qyqs | ||
| MYSQL_PASSWORD='p92oVkNxrUttUUu8qyqs' | ||
| ## redis初始密码, 示例: nse3fLtG4Bm53URq4Ex | ||
| REDIS_PASSWORD='p92oVkNxrUttUUu8qyqs' | ||
| ## rabbitMq初始密码, 示例: Prr1139gdGhMJ4RDo7Gt | ||
| RABBITMQ_PASSWORD='p92oVkNxrUttUUu8qyqs' | ||
| ## Email密码, 示例ZfJwfEJvL8wbPr4LvCyx | ||
| MAIL_PASSWORD='p92oVkNxrUttUUu8qyqs' | ||
|
|
||
| #----------自定义端口信息, 推荐开放9000~9100,443,80-------- | ||
| # nginx前端配置 | ||
| WEB_PORT_HTTP=9080 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| #---------服务器信息, 必须按实际服务器信息填写----------------- | ||
| ## 公网IP | ||
| SERVER_IP_PUBLIC='81.71.36.80' | ||
| ## HOSTNAME 没有用域名IP替代 | ||
| SERVER_HOSTNAME='transcodegroup.cn' | ||
| ## SSL证书 | ||
| SSL_CERTIFICATE='/home/docker-compose/ssl/tg_com' | ||
|
|
||
| #---------自定义初始密码, 建议随机生成新的替换------------- | ||
| ## MYSQL, 必填 | ||
| MYSQL_PASSWORD='ZfJwfEJvL8wbPr4LvCyx' | ||
| ## REDIS, 必填 | ||
| REDIS_PASSWORD='ZfJwfEJvL8wbPr4LvCyx' | ||
| ## RABBIT_MQ, 必填 | ||
| RABBITMQ_PASSWORD='ZfJwfEJvL8wbPr4LvCyx' | ||
| ## Email,必填 | ||
| MAIL_PASSWORD='ZfJwfEJvL8wbPr4LvCyx' | ||
|
|
||
| #----------自定义端口信息, 推荐开放9000~9100,443,80-------- | ||
| # 前端端口配置, HTTP默认80, HTTPS默认443 | ||
| WEB_PORT_HTTP=9070 | ||
| WEB_PORT_HTTPS=9080 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # Bus单机部署, 使用https | ||
| # 密码/端口/域名等信息在.env文件中配置 | ||
| include: | ||
| - ../docker/mysql8/compose.yml | ||
| - ../docker/rabbitmq/compose.yml | ||
| - ../docker/redis/compose.yml | ||
| - ../docker/bus/compose.yml | ||
| - ../docker/video-nginx/compose.yml | ||
| - path: | ||
| - ../docker/video/compose.yml | ||
| - ../docker/video/compose.bus.yml | ||
| - path: | ||
| - ../docker/nginx/compose.yml | ||
| - ../docker/nginx/compose.bus.yml | ||
| - ../docker/nginx/compose.bus.https.yml | ||
| - path: | ||
| - ../docker/web-downloader/compose.yml | ||
| - ../docker/web-downloader/compose.bus.yml |
xiaorongnie marked this conversation as resolved.
Show resolved
Hide resolved
xiaorongnie marked this conversation as resolved.
Show resolved
Hide resolved
|
File renamed without changes.
File renamed without changes.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.