-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
37 lines (36 loc) · 954 Bytes
/
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
version: '3'
services:
mysql:
image: mysql:5.7.28
#command: --default-authentication-plugin=mysql_native_password
container_name: mysql-slave
restart: always
hostname: 'db.example.com'
environment:
MYSQL_ROOT_PASSWORD: Wchh73****Z4onIZyc # root账户的密码
ports:
- 3308:3306
volumes:
- mysql:/var/lib/mysql
- mysql-conf:/etc/mysql/conf.d
- /etc/sysconfig/clock:/etc/sysconfig/clock
- /etc/localtime:/etc/localtime:ro
- /usr/share/zoneinfo:/usr/share/zoneinfo
networks:
- mysql-master-slave
volumes:
mysql:
driver: local
driver_opts:
type: bind
o: bind
device: ${PWD}/data
mysql-conf:
driver: local
driver_opts:
type: bind
o: bind
device: ${PWD}/conf/conf.d
networks:
mysql-master-slave:
driver: bridge