Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env.default
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ SERVER_IP_INTERNAL='' # 127.0.0.1
# 服务器域名
SERVER_HOSTNAME='' # livedvr.tripsdd.com
SSL_CERTIFICATE='' # /home/docker-compose/ssl/livedvr_tripsdd_com
# 数据目录
DATA_DIR=/data

# bus和track部署在同一台服务器上时, 需要通过域名区分两者
BUS_HOSTNAME=${SERVER_HOSTNAME}
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,18 @@ git clone https://github.com/TranscodeGroup/docker.git /home/docker

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

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

```sh
docker compose config
```

校验通过之后, 执行如下命令, 将compose配置导出成一个文件, 方便在更新compose文件后对比差异:

```sh
docker compose config > compose-stack.yaml
```

### 4. 下载前端文件

部署distar等项目的前端:
Expand Down
16 changes: 8 additions & 8 deletions bus/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ services:
container_name: gateway_808_2019
restart: always
volumes:
- /data/files:/data/files
- /data/logs/gateway_808_2019:/logs
- ${DATA_DIR:-/data}/files:/data/files
- ${DATA_DIR:-/data}/logs/gateway_808_2019:/logs
environment:
- gateway_ip=${JTT808_IP}
- gateway_port=${JTT808_PORT}
Expand Down Expand Up @@ -57,7 +57,7 @@ services:
container_name: gateway_web
restart: always
volumes:
- /data/files:/data/files
- ${DATA_DIR:-/data}/files:/data/files
- /usr/share/fonts:/usr/share/fonts
# ports:
# 内部端口, 不暴露
Expand Down Expand Up @@ -108,7 +108,7 @@ services:
container_name: gateway_dispatch
restart: always
volumes:
- /data/files:/data/files
- ${DATA_DIR:-/data}/files:/data/files
# ports:
# 内部端口, 不暴露
# - 8011:8011
Expand Down Expand Up @@ -158,8 +158,8 @@ services:
ports:
- ${JTT808_PORT_FILE}:${JTT808_PORT_FILE}
volumes:
- "/data/logs/jsatl12:/logs"
- "/data/files/alarm:/data/files/alarm"
- "${DATA_DIR:-/data}/logs/jsatl12:/logs"
- "${DATA_DIR:-/data}/files/alarm:/data/files/alarm"
environment:
- gateway_expire_days=16
- gateway_port=${JTT808_PORT_FILE}
Expand All @@ -182,8 +182,8 @@ services:
container_name: gateway_calculation
restart: always
volumes:
- /data/logs/gateway_calculation:/logs
- /data/files:/data/files
- ${DATA_DIR:-/data}/logs/gateway_calculation:/logs
- ${DATA_DIR:-/data}/files:/data/files
environment:
# 默认开启分区存储
- DYNAMIC_TABLE=TRUE
Expand Down
4 changes: 2 additions & 2 deletions jtt808/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ services:
- ${JTT808_PORT_FTP_PASSIVE}:${JTT808_PORT_FTP_PASSIVE}
volumes:
- "/etc/localtime:/etc/localtime:ro"
- "/data/jtt808:/data/jtt808"
- "/data/logs/jtt808:/logs"
- "${DATA_DIR:-/data}/jtt808:/data/jtt808"
- "${DATA_DIR:-/data}/logs/jtt808:/logs"
environment:
- JAVA_TOOL_OPTIONS=-Xms1024m -Xmx2048m
# 监听端口
Expand Down
4 changes: 2 additions & 2 deletions maintain/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ services:
volumes:
- /etc/localtime:/etc/localtime
- ${MAINTAIN_TOKEN_DIR:-/home/docker-compose/token}:/home/token
- /data/logs/maintain:/logs
- /data/fonts:/data/fonts
- ${DATA_DIR:-/data}/logs/maintain:/logs
- ${DATA_DIR:-/data}/fonts:/data/fonts
ports:
- ${MAINTAIN_PORT:-8080}:8080
environment:
Expand Down
2 changes: 1 addition & 1 deletion minio/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ services:
- MINIO_ROOT_PASSWORD=${MINIO_PASSWORD:?required}
- MINIO_BROWSER_REDIRECT_URL=https://${VIDEO_HOSTNAME:?required}
volumes:
- "/data/minio-data:/data"
- "${DATA_DIR:-/data}/minio-data:/data"
command: server /data --console-address ":${MINIO_PORT_HTTP:-8001}" --address ":${MINIO_PORT:-8000}"
logging:
driver: "json-file"
Expand Down
6 changes: 3 additions & 3 deletions mongodb/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ services:
- ${MONGODB_PORT:-27017}:27017
volumes:
- /etc/localtime:/etc/localtime
- /data/mongo/data/db:/data/db
- /data/mongo/data/log:/var/log/mongodb
- /data/mongo/data/config:/etc/mongo
- ${DATA_DIR:-/data}/mongo/data/db:/data/db
- ${DATA_DIR:-/data}/mongo/data/log:/var/log/mongodb
- ${DATA_DIR:-/data}/mongo/data/config:/etc/mongo
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=${MONGODB_PASSWORD:?required}
Expand Down
8 changes: 4 additions & 4 deletions mysql5.7/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ services:
ports:
- ${MYSQL_PORT:-3306}:3306
volumes:
- /data/mysql5.7/data:/var/lib/mysql
- /data/mysql5.7/logs:/var/log/mysql
- /data/mysql5.7/backup/database:/mysql/backup/database
- /data/mysql5.7/backup/log:/mysql/backup/log
- ${DATA_DIR:-/data}/mysql5.7/data:/var/lib/mysql
- ${DATA_DIR:-/data}/mysql5.7/logs:/var/log/mysql
- ${DATA_DIR:-/data}/mysql5.7/backup/database:/mysql/backup/database
- ${DATA_DIR:-/data}/mysql5.7/backup/log:/mysql/backup/log
environment:
# 设置密码
- MYSQL_ROOT_PASSWORD=${MYSQL_PASSWORD:?required}
Expand Down
8 changes: 4 additions & 4 deletions mysql8/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ services:
- source: mysql8.initdb
target: /docker-entrypoint-initdb.d
volumes:
- "/data/mysql8/data:/var/lib/mysql"
- "/data/mysql8/logs:/var/log/mysql"
- "/data/mysql8/backup/database:/mysql/backup/database"
- "/data/mysql8/backup/log:/mysql/backup/log"
- "${DATA_DIR:-/data}/mysql8/data:/var/lib/mysql"
- "${DATA_DIR:-/data}/mysql8/logs:/var/log/mysql"
- "${DATA_DIR:-/data}/mysql8/backup/database:/mysql/backup/database"
- "${DATA_DIR:-/data}/mysql8/backup/log:/mysql/backup/log"
environment:
# 设置密码
- MYSQL_ROOT_PASSWORD=${MYSQL_PASSWORD:?required}
Expand Down
2 changes: 1 addition & 1 deletion nginx/compose.bus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ services:
environment:
- BUS_HOSTNAME=${BUS_HOSTNAME:?required}
volumes:
- "/data/files:/data/files"
- "${DATA_DIR:-/data}/files:/data/files"
secrets:
bus-ssl-certificate:
file: ${BUS_SSL_CERTIFICATE:?required}.crt
Expand Down
4 changes: 2 additions & 2 deletions nginx/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ services:
- ssl-certificate
- ssl-certificate-key
volumes:
- "/data/nginx/html:/usr/share/nginx/html"
- "/data/logs/nginx:/var/log/nginx"
- "${DATA_DIR:-/data}/nginx/html:/usr/share/nginx/html"
- "${DATA_DIR:-/data}/logs/nginx:/var/log/nginx"
configs:
- source: nginx-nginx.conf
target: /etc/nginx/nginx.conf
Expand Down
8 changes: 4 additions & 4 deletions projects/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

```sh
# 确认https://github.com/TranscodeGroup/maintain-vben-admin仓库存在对应的版本tag
# 确认 https://xn.transcodegroup.cn:8590/buildConfiguration/MaintainVbenAdmin_Release?mode=builds 已经打包出附件
# 确认 http://th-ci.transcodegroup.cn:9080/buildConfiguration/MaintainVbenAdmin_Release 已经打包出附件

# 下载tag版本到默认目录, 并解压到版本对应的文件夹
/home/docker/projects/distar-beta-depoly.sh --tag=v1.15.1
/home/docker/projects/distar-beta-deploy.sh --tag=v1.15.1

# 下载tag版本到当前目录
/home/docker/projects/distar-beta-depoly.sh --tag=v1.15.1 --dir=.
/home/docker/projects/distar-beta-deploy.sh --tag=v1.15.1 --dir=.

# 下载tag版本到/data/nginx/html目录
/home/docker/projects/distar-beta-depoly.sh --tag=v1.15.1 --dir=/data/nginx/html
/home/docker/projects/distar-beta-deploy.sh --tag=v1.15.1 --dir=/data/nginx/html
```
2 changes: 1 addition & 1 deletion projects/distar/_app.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
window.__PRODUCTION__APP__CONF__ = {
VITE_GLOB_APP_TITLE: 'Distar GPS',
VITE_GLOB_APP_SHORT_NAME: 'tracker-distar',
VITE_GLOB_API_URL: 'http://58.82.168.197:9080',
VITE_GLOB_API_URL: '',
VITE_GLOB_API_URL_PREFIX: '/api',
VITE_GLOB_UPLOAD_URL: '/upload',
}
Expand Down
2 changes: 1 addition & 1 deletion rabbitmq/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ services:
- RABBITMQ_DEFAULT_PASS=${RABBITMQ_PASSWORD:?required}
- RABBITMQ_DEFAULT_VHOST=/track
volumes:
- "/data/rabbitmq:/var/lib/rabbitmq"
- "${DATA_DIR:-/data}/rabbitmq:/var/lib/rabbitmq"
logging:
driver: "json-file"
options:
Expand Down
4 changes: 2 additions & 2 deletions redis/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ services:
container_name: redis
restart: always
# 启用持久化 增加密码 降低日志级别 限制数据库数量
command: --appendonly yes --requirepass ${REDIS_PASSWORD:?required} --loglevel warning --databases 3
command: --appendonly yes --requirepass "${REDIS_PASSWORD:?required}" --loglevel warning --databases 3
volumes:
- /data/redis/data:/data
- ${DATA_DIR:-/data}/redis/data:/data
ports:
- ${REDIS_PORT:-6379}:6379
logging:
Expand Down
2 changes: 1 addition & 1 deletion video-nginx/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ services:
# https://hub.docker.com/_/nginx#:~:text=Using%20environment%20variables
#- "/home/docker/video-nginx/conf/conf.d:/etc/nginx/templates"
- "/home/docker/video-nginx/html:/usr/share/nginx/html"
- "/data/logs/video-nginx:/var/log/nginx"
- "${DATA_DIR:-/data}/logs/video-nginx:/var/log/nginx"
configs:
- source: nginx.conf
target: /etc/nginx/nginx.conf
Expand Down
6 changes: 3 additions & 3 deletions video/compose.storage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ services:
srs:
volumes:
- "/home/docker/video/srs-storage/conf:/usr/local/srs/conf"
- "/data/srs-storage/html:/usr/local/srs/objs/nginx/html"
- "${DATA_DIR:-/data}/srs-storage/html:/usr/local/srs/objs/nginx/html"
rtp:
volumes:
- "/data/logs/rtp-storage:/logs"
- "/data/srs-storage/html/dvr/live:/data/record"
- "${DATA_DIR:-/data}/logs/rtp-storage:/logs"
- "${DATA_DIR:-/data}/srs-storage/html/dvr/live:/data/record"
depends_on:
- minio
environment:
Expand Down
4 changes: 2 additions & 2 deletions video/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ services:
#- 8080:8080
volumes:
- "/home/docker/video/srs/conf:/usr/local/srs/conf"
- "/data/srs/html:/usr/local/srs/objs/nginx/html"
- "${DATA_DIR:-/data}/srs/html:/usr/local/srs/objs/nginx/html"
ulimits:
nproc: 65535
nofile:
Expand Down Expand Up @@ -40,7 +40,7 @@ services:
# 客户端-对讲和api服务接口,建议nginx代理, 内部别名访问
# - 9006:9006
volumes:
- "/data/logs/rtp:/logs"
- "${DATA_DIR:-/data}/logs/rtp:/logs"
environment:
# 服务节点名称
- gateway_zone=live-${VIDEO_IP:?required}
Expand Down