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
| version: '3' services: mysql: image: mysql:8 container_name: mysql-canal environment: - TZ=Asia/Shanghai - MYSQL_ROOT_PASSWORD=Jiang110. ports: - 3336:3306 volumes: - ./mysql/data/:/var/lib/mysql/ - ./mysql/my.cnf:/etc/my.cnf - ./mysql/init/:/docker-entrypoint-initdb.d/ command: --default-authentication-plugin=mysql_native_password --character-set-server=utf8mb4 --collation-server=utf8mb4_general_ci --explicit_defaults_for_timestamp=true --lower_case_table_names=1 canal-server: image: canal/canal-server:v1.1.5 container_name: canal-server ports: - 11111:11111 environment: - canal.instance.mysql.slaveId=200 - canal.instance.master.address=172.16.21.201:3336 - canal.instance.dbUsername=root - canal.instance.dbPassword=Jiang110. - canal.mq.topic=loginLogCanalTopic - canal.instance.connectionCharset=UTF-8 - canal.instance.filter.regex=test.user - canal.destinations=test - canal.mq.topic=test volumes: - /root/cancel/conf/canal.properties:/home/admin/canal-server/conf/canal.properties - /root/cancel/logs/:/home/admin/canal-server/logs/
|