-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
48 lines (45 loc) · 1.31 KB
/
docker-compose.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
services:
opentask-mysql:
restart: always
image: registry.cn-hangzhou.aliyuncs.com/hgui/mysql:8.4.1
container_name: opentask-mysql
volumes:
- /apps/mysql/mysql:/var/lib/mysql
- /apps/mysql/conf.d:/etc/mysql/conf.d
environment:
- "MYSQL_ROOT_PASSWORD=OPEN_TASK_123" # 请修改此处的密码
- "MYSQL_DATABASE=open_task"
ports:
- 3306:3306
healthcheck:
test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost" ]
interval: 2s
timeout: 2s
retries: 10
opentask-api:
restart: always
image: registry.cn-hangzhou.aliyuncs.com/hgui/opentask:latest
container_name: opentask-api
depends_on:
opentask-mysql:
condition: service_healthy
volumes:
- /apps/opentask/logs:/app/logs
environment:
- "ConnectionStrings__Core=server=opentask-mysql;Port=3306;user id=root;database=open_task;pooling=true;password=OPEN_TASK_123" # 请修改此处的密码
- "TZ=Asia/Shanghai"
ports:
- 8080:8080
- 1883:1883
links:
- opentask-mysql
opentask-nginx:
restart: always
image: registry.cn-hangzhou.aliyuncs.com/hgui/nginx:1.26.1
container_name: opentask-nginx
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
ports:
- 80:80
links:
- opentask-api