1
+ version : ' 2.1'
2
+
3
+ services :
4
+ redis :
5
+ image : docker.io/bitnami/redis:6.2
6
+ environment :
7
+ - ALLOW_EMPTY_PASSWORD=yes
8
+ - REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL
9
+ ports :
10
+ - ' 6379:6379'
11
+ volumes :
12
+ - ' redis_data:/bitnami/redis/data'
13
+ zoo1 :
14
+ image : confluentinc/cp-zookeeper:7.3.2
15
+ hostname : zoo1
16
+ container_name : zoo1
17
+ ports :
18
+ - " 2181:2181"
19
+ environment :
20
+ ZOOKEEPER_CLIENT_PORT : 2181
21
+ ZOOKEEPER_SERVER_ID : 1
22
+ ZOOKEEPER_SERVERS : zoo1:2888:3888
23
+ kafka1 :
24
+ image : confluentinc/cp-kafka:7.3.2
25
+ hostname : kafka1
26
+ container_name : kafka1
27
+ ports :
28
+ - " 9092:9092"
29
+ - " 29092:29092"
30
+ environment :
31
+ KAFKA_ADVERTISED_LISTENERS : INTERNAL://kafka1:19092,EXTERNAL://${DOCKER_HOST_IP:-127.0.0.1}:9092,DOCKER://host.docker.internal:29092
32
+ KAFKA_LISTENER_SECURITY_PROTOCOL_MAP : INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT,DOCKER:PLAINTEXT
33
+ KAFKA_INTER_BROKER_LISTENER_NAME : INTERNAL
34
+ KAFKA_ZOOKEEPER_CONNECT : " zoo1:2181"
35
+ KAFKA_BROKER_ID : 1
36
+ KAFKA_LOG4J_LOGGERS : " kafka.controller=INFO,kafka.producer.async.DefaultEventHandler=INFO,state.change.logger=INFO"
37
+ KAFKA_AUTHORIZER_CLASS_NAME : kafka.security.authorizer.AclAuthorizer
38
+ KAFKA_ALLOW_EVERYONE_IF_NO_ACL_FOUND : " true"
39
+ depends_on :
40
+ - zoo1
41
+ kafka2 :
42
+ image : confluentinc/cp-kafka:7.3.2
43
+ hostname : kafka2
44
+ container_name : kafka2
45
+ ports :
46
+ - " 9093:9093"
47
+ - " 29093:29093"
48
+ environment :
49
+ KAFKA_ADVERTISED_LISTENERS : INTERNAL://kafka2:19093,EXTERNAL://${DOCKER_HOST_IP:-127.0.0.1}:9093,DOCKER://host.docker.internal:29093
50
+ KAFKA_LISTENER_SECURITY_PROTOCOL_MAP : INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT,DOCKER:PLAINTEXT
51
+ KAFKA_INTER_BROKER_LISTENER_NAME : INTERNAL
52
+ KAFKA_ZOOKEEPER_CONNECT : " zoo1:2181"
53
+ KAFKA_BROKER_ID : 2
54
+ KAFKA_LOG4J_LOGGERS : " kafka.controller=INFO,kafka.producer.async.DefaultEventHandler=INFO,state.change.logger=INFO"
55
+ KAFKA_AUTHORIZER_CLASS_NAME : kafka.security.authorizer.AclAuthorizer
56
+ KAFKA_ALLOW_EVERYONE_IF_NO_ACL_FOUND : " true"
57
+ depends_on :
58
+ - zoo1
59
+ kafka3 :
60
+ image : confluentinc/cp-kafka:7.3.2
61
+ hostname : kafka3
62
+ container_name : kafka3
63
+ ports :
64
+ - " 9094:9094"
65
+ - " 29094:29094"
66
+ environment :
67
+ KAFKA_ADVERTISED_LISTENERS : INTERNAL://kafka3:19094,EXTERNAL://${DOCKER_HOST_IP:-127.0.0.1}:9094,DOCKER://host.docker.internal:29094
68
+ KAFKA_LISTENER_SECURITY_PROTOCOL_MAP : INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT,DOCKER:PLAINTEXT
69
+ KAFKA_INTER_BROKER_LISTENER_NAME : INTERNAL
70
+ KAFKA_ZOOKEEPER_CONNECT : " zoo1:2181"
71
+ KAFKA_BROKER_ID : 3
72
+ KAFKA_LOG4J_LOGGERS : " kafka.controller=INFO,kafka.producer.async.DefaultEventHandler=INFO,state.change.logger=INFO"
73
+ KAFKA_AUTHORIZER_CLASS_NAME : kafka.security.authorizer.AclAuthorizer
74
+ KAFKA_ALLOW_EVERYONE_IF_NO_ACL_FOUND : " true"
75
+ depends_on :
76
+ - zoo1
77
+ kafka-ui :
78
+ image : provectuslabs/kafka-ui:latest
79
+ ports :
80
+ - 8085:8080
81
+ environment :
82
+ KAFKA_CLUSTERS_0_NAME : local1
83
+ KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS : kafka1:29092, kafka2:29093, kafka3:29094
84
+ DYNAMIC_CONFIG_ENABLED : ' true'
85
+ depends_on :
86
+ - kafka1
87
+ - kafka2
88
+ - kafka3
89
+ - zoo1
90
+ volumes :
91
+ redis_data:
0 commit comments