-
Notifications
You must be signed in to change notification settings - Fork 162
/
docker-compose-arm.yml
94 lines (89 loc) · 3.07 KB
/
docker-compose-arm.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
version: '3.9'
services:
zookeeper:
image: confluentinc/cp-zookeeper:7.0.4.arm64
restart: unless-stopped
ports:
- '32181:32181'
environment:
ZOOKEEPER_CLIENT_PORT: 32181
ZOOKEEPER_TICK_TIME: 2000
healthcheck:
test: "zookeeper-shell 127.0.01:32181 ls /"
interval: 10s
timeout: 10s
retries: 5
kafka-1:
image: confluentinc/cp-kafka:7.0.4.arm64
ports:
- '9092:9092'
depends_on:
zookeeper:
condition: service_healthy
env_file: docker-compose-kafka.env
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:32181
KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka-1:29092,EXTERNAL://localhost:9092
healthcheck:
test: kafka-topics --bootstrap-server kafka-1:29092 --list
interval: 30s
timeout: 10s
retries: 4
volumes:
- ./ssl/kafka.server.keystore.jks:/etc/kafka/secrets/kafka.server.keystore.jks:ro,z
- ./ssl/kafka.server.truststore.jks:/etc/kafka/secrets/kafka.server.truststore.jks:ro,z
kafka-2:
image: confluentinc/cp-kafka:7.0.4.arm64
ports:
- '9093:9093'
depends_on:
zookeeper:
condition: service_healthy
env_file: docker-compose-kafka.env
environment:
KAFKA_BROKER_ID: 2
KAFKA_ZOOKEEPER_CONNECT: zookeeper:32181
KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka-2:29093,EXTERNAL://localhost:9093
healthcheck:
test: kafka-topics --bootstrap-server kafka-2:29093 --list
interval: 30s
timeout: 10s
retries: 4
volumes:
- ./ssl/kafka.server.keystore.jks:/etc/kafka/secrets/kafka.server.keystore.jks:ro,z
- ./ssl/kafka.server.truststore.jks:/etc/kafka/secrets/kafka.server.truststore.jks:ro,z
kafka-3:
image: confluentinc/cp-kafka:7.0.4.arm64
ports:
- '9094:9094'
depends_on:
zookeeper:
condition: service_healthy
env_file: docker-compose-kafka.env
environment:
KAFKA_BROKER_ID: 3
KAFKA_ZOOKEEPER_CONNECT: zookeeper:32181
KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka-3:29094,EXTERNAL://localhost:9094
healthcheck:
test: kafka-topics --bootstrap-server kafka-2:29093 --list
interval: 30s
timeout: 10s
retries: 4
volumes:
- ./ssl/kafka.server.keystore.jks:/etc/kafka/secrets/kafka.server.keystore.jks:ro,z
- ./ssl/kafka.server.truststore.jks:/etc/kafka/secrets/kafka.server.truststore.jks:ro,z
kafka_setup:
image: confluentinc/cp-kafka:7.0.4.arm64
depends_on:
zookeeper:
condition: service_healthy
kafka-1:
condition: service_healthy
kafka-2:
condition: service_healthy
kafka-3:
condition: service_healthy
command: "bash -c 'kafka-topics --zookeeper zookeeper:32181 --create --if-not-exists --partitions 4 --replication-factor 2 --topic consumer_group_implementation_test && \
kafka-topics --zookeeper zookeeper:32181 --create --if-not-exists --partitions 4 --replication-factor 2 --topic test0p8p0 && \
kafka-topics --zookeeper zookeeper:32181 --list'"