-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
56 lines (56 loc) · 1.63 KB
/
docker-compose.yaml
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
49
50
51
52
53
54
55
56
version: "3.9"
services:
mysql:
image: mysql:latest
restart: always
container_name: mysql
ports:
- 3306:3306
environment:
- MYSQL_USER=mysql
- MYSQL_PASSWORD=mysql
- MYSQL_ROOT_PASSWORD=mysql
healthcheck:
test: mysqladmin ping -h localhost -P 3306 -u root --password=mysql
interval: 2s
timeout: 20s
retries: 10
mysqlsetup:
image: mysql:latest
container_name: mysqlsetup
depends_on:
mysql:
condition: service_healthy
restart: "no"
environment:
BINLOG_FORMAT: ROW
entrypoint: [ "bash", "-c" , "sleep 20 && mysql --host mysql --port=3306 --user=root --password=mysql -e 'SET GLOBAL binlog_format=ROW;'; mysql --host=mysql --port=3306 --user=root --password=mysql -e 'create database test;'; mysql --host=mysql --port=3306 --user=root --password=mysql --database=test -e 'create table customers(id int, name varchar(100))'"]
rabbitmq:
image: rabbitmq:3-management
container_name: rabbitmq
ports:
- 15672:15672
volumes:
- type: bind
source: ./conf/rabbitmq-defs.json
target: /etc/rabbitmq/rabbitmq-defs.json
- type: bind
source: ./conf/rabbitmq.conf
target: /etc/rabbitmq/rabbitmq.conf
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 30s
timeout: 30s
retries: 3
debezium-server:
image: quay.io/debezium/server:2.4
container_name: debezium-server
ports:
- 8080:8080
volumes:
- ./conf:/debezium/conf
depends_on:
mysql:
condition: service_healthy
rabbitmq:
condition: service_healthy