-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose-nightly.yml
93 lines (90 loc) · 2.79 KB
/
docker-compose-nightly.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
version: '3.4'
services:
beidou-server:
container_name: beidou-server
# nightly 为每日构建
image: ghcr.io/beidoums/beidou-server:nightly
# 自己构建..
# build:
# context: .
# dockerfile: Dockerfile-server
environment:
TZ: Asia/Shanghai
ports:
# Web 由nginx路由
# - "8686:8686"
# Login server
- "8484:8484"
# Channels.
- "7575-7577:7575-7577"
# 如果要挂载wz scripts 先执行以下指令 ↓ 再取消注释 volumes 设置
# sudo docker create --name temp-beidou ghcr.io/beidoums/beidou-server:nightly && sudo docker cp temp-beidou:/opt/server beidou-server-nightly && sudo docker rm temp-beidou
# 注意 命令行参数的优先级高于 application.yml 配置文件
# volumes:
# - ./beidou-server-nightly:/opt/server
entrypoint:
- java
- -jar
- ./BeiDou.jar
- --spring.config.location=./application.yml
- --mybatis-flex.datasource.mysql.url=jdbc:mysql://beidou-db:3306/beidou?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
- --mybatis-flex.datasource.mysql.username=root
- --mybatis-flex.datasource.mysql.password=root
- --gms.service.wan-host=127.0.0.1
- --gms.service.lan-host=127.0.0.1
- --gms.service.localhost=127.0.0.1
# 如果前端访问失败,可以尝试修改↓
# - --app.vue=<前端url>
# 生产环境请自行生成密钥,并关闭 swagger
# - --jwt.secret=50da066e-6080-40f5-a173-86bd27d4f674
# - --springdoc.api-docs.enabled=true
# - --springdoc.swagger-ui.enabled=true
healthcheck:
test: ["CMD", "sh", "-c", "netstat -tunlp | grep 0.0.0.0:8484 || exit 1"]
interval: 10s
timeout: 5s
retries: 10
depends_on:
beidou-db:
condition: service_healthy
networks:
- beidou-network
beidou-ui:
container_name: beidou-ui
# nightly 为每日构建
image: ghcr.io/beidoums/beidou-ui:nightly
# 自己构建..
# build:
# context: .
# dockerfile: Dockerfile-ui
# 可以挂载出来 修改端口,添加证书
# volumes:
# - ./nginx-ui.conf:/etc/nginx/conf.d/default.conf
ports:
# Web
- "8686:8686"
depends_on:
- beidou-server
networks:
- beidou-network
beidou-db:
container_name: beidou-db
image: mysql:8.4.0
environment:
# mysql root 默认密码
MYSQL_ROOT_PASSWORD: "root"
ports:
- "3306:3306"
volumes:
- ./docker-db-data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-uroot", "-proot"]
interval: 10s
timeout: 5s
retries: 10
start_period: 10s
networks:
- beidou-network
networks:
beidou-network:
driver: bridge