forked from rganowski/citus-kafka
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
110 lines (107 loc) · 3.04 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
x-postgres-auth: &POSTGRES_AUTH
POSTGRES_USER: postgres
POSTGRES_PASSWORD: superRSecret
POSTGRES_HOST_AUTH_METHOD: trust
x-kafka-common: &KAFKA_COMMON_ENVS
KAFKA_CFG_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: CLIENT:PLAINTEXT,EXTERNAL:PLAINTEXT
KAFKA_CFG_LISTENERS: CLIENT://:9092,EXTERNAL://:9093
KAFKA_CFG_INTER_BROKER_LISTENER_NAME: CLIENT
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_LOG_RETENTION_HOURS: 3
ALLOW_PLAINTEXT_LISTENER: 'yes'
services:
zookeeper:
container_name: zookeeper
image: bitnami/zookeeper:3.8.0
hostname: zookeeper_1
ports:
- "12181:2181"
volumes:
- "zookeeper_data:/bitnami"
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
kafka_1:
image: bitnami/kafka:3.2.3
container_name: kafka_1
hostname: kafka_1
ports:
- "19093:9093"
volumes:
- "kafka_data_1:/bitnami"
environment:
<<: *KAFKA_COMMON_ENVS
KAFKA_BROKER_ID: 1
KAFKA_CFG_ADVERTISED_LISTENERS: CLIENT://kafka_1:9092,EXTERNAL://localhost:19093
depends_on:
- zookeeper
kafka_2:
image: bitnami/kafka:3.2.3
container_name: kafka_2
hostname: kafka_2
ports:
- "29093:9093"
volumes:
- "kafka_data_2:/bitnami"
environment:
<<: *KAFKA_COMMON_ENVS
KAFKA_BROKER_ID: 2
KAFKA_CFG_ADVERTISED_LISTENERS: CLIENT://kafka_2:9092,EXTERNAL://localhost:29093
depends_on:
- zookeeper
kafka_connect:
image: "debezium/connect:1.9.5.Final"
container_name: kafka_connect
hostname: kafka_connect
ports:
- "8083:8083"
environment:
STATUS_STORAGE_TOPIC: connect_statuses
OFFSET_STORAGE_TOPIC: connect_offsets
CONFIG_STORAGE_TOPIC: connect_configs
GROUP_ID: 1
BOOTSTRAP_SERVERS: kafka_1:9092,kafka_2:9092,kafka_3:9092
depends_on:
- kafka_1
- kafka_2
- postgres_worker_1
- postgres_worker_2
postgres_master:
image: "citusdata/citus:11.1.1-alpine"
container_name: postgres_master
ports:
- "${COORDINATOR_EXTERNAL_PORT:-5432}:5432"
environment: *POSTGRES_AUTH
volumes:
- "postgres_master_data:/var/lib/postgresql"
postgres_worker_1:
image: "citusdata/citus:11.1.1-alpine"
container_name: postgres_worker_1
environment: *POSTGRES_AUTH
volumes:
- "postgres_worker_1_data:/var/lib/postgresql"
command: [ "postgres", "-c", "wal_level=logical", "-c", "wal_writer_delay=10" ]
postgres_worker_2:
image: "citusdata/citus:11.1.1-alpine"
container_name: postgres_worker_2
environment: *POSTGRES_AUTH
volumes:
- "postgres_worker_2_data:/var/lib/postgresql"
command: [ "postgres", "-c", "wal_level=logical", "-c", "wal_writer_delay=10" ]
volumes:
zookeeper_data:
driver: local
kafka_data_1:
driver: local
kafka_data_2:
driver: local
kafka_connect_data:
driver: local
postgres_healthcheck:
driver: local
postgres_master_data:
driver: local
postgres_worker_1_data:
driver: local
postgres_worker_2_data:
driver: local