-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathdocker-compose.yml
47 lines (46 loc) · 1.18 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
version: '3'
services:
mysql:
image: mysql:5.7
restart: always
hostname: mysql
container_name: xxl_job_db
ports:
- 28889:3306
volumes:
#mysql数据库挂载到host物理机目录/e/docker/mysql/data/db
- "./data:/var/lib/mysql"
#容器的配置目录挂载到host物理机目录/e/docker/mysql/data/conf
- "./conf:/etc/mysql/conf.d"
- "./root:/root"
- "./init:/docker-entrypoint-initdb.d"
environment:
MYSQL_DATABASE: xxl-job
MYSQL_ROOT_PASSWORD: 123456 #root管理员用户密码
command: [
'--character-set-server=utf8mb4',
'--collation-server=utf8mb4_unicode_ci'
]
networks:
- xxl_job_net
admin:
image: xuxueli/xxl-job-admin:2.0.2
restart: always
hostname: admin
container_name: xxl_job
ports:
- 28888:8080
links:
- mysql
volumes:
- "./tmp:/data/applogs"
environment:
- spring.datasource.url=jdbc:mysql://mysql:3306/xxl-job?Unicode=true&characterEncoding=UTF-8&autoReconnect=true
- spring.datasource.password=123456
depends_on:
- mysql
networks:
- xxl_job_net
networks:
xxl_job_net:
driver: bridge