forked from Flyfoxs/canal2kafka
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
43 lines (38 loc) · 982 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
37
38
39
40
41
42
43
version: '2.1'
services:
mysql-src:
image: mysql:8.0.0
container_name: mysql-src
networks:
- sc-net
ports:
- 3306:3306
volumes:
- ./db_init/:/docker-entrypoint-initdb.d/
command: mysqld --datadir=/var/lib/mysql --user=mysql --server-id=1 --log-bin=/var/lib/mysql/mysql-bin.log
environment:
TZ: Asia/Shanghai
MYSQL_ROOT_PASSWORD: root
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost", "-proot", "--protocol=tcp"]
timeout: 20s
retries: 10
mysql-des:
image: mysql:8.0.0
container_name: mysql-des
networks:
- sc-net
ports:
- 3307:3306
volumes:
- ./db_init/:/docker-entrypoint-initdb.d/
environment:
TZ: Asia/Shanghai
MYSQL_ROOT_PASSWORD: root
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost", "-proot", "--protocol=tcp"]
timeout: 20s
retries: 10
networks:
sc-net:
external: true