11services :
2- zookeeper :
3- image : confluentinc/cp-zookeeper:7.2.0
4- hostname : zookeeper
5- container_name : zookeeper
6- ports :
7- - " 2181:2181"
8- environment :
9- ZOOKEEPER_CLIENT_PORT : 2181
10- ZOOKEEPER_TICK_TIME : 2000
112
123 broker :
13- image : confluentinc/cp-server :7.2 .0
4+ image : confluentinc/cp-kafka :7.7 .0
145 hostname : broker
156 container_name : broker
16- depends_on :
17- - zookeeper
187 ports :
198 - " 9092:9092"
209 - " 9101:9101"
2110 environment :
22- KAFKA_BROKER_ID : 1
23- KAFKA_ZOOKEEPER_CONNECT : ' zookeeper:2181'
24- KAFKA_LISTENER_SECURITY_PROTOCOL_MAP : PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
25- KAFKA_ADVERTISED_LISTENERS : PLAINTEXT://broker:29092,PLAINTEXT_HOST://localhost:9092
26- KAFKA_METRIC_REPORTERS : io.confluent.metrics.reporter.ConfluentMetricsReporter
11+ KAFKA_NODE_ID : 1
12+ KAFKA_LISTENER_SECURITY_PROTOCOL_MAP : ' CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT'
13+ KAFKA_ADVERTISED_LISTENERS : ' PLAINTEXT://broker:29092,PLAINTEXT_HOST://localhost:9092'
2714 KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR : 1
2815 KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS : 0
29- KAFKA_CONFLUENT_LICENSE_TOPIC_REPLICATION_FACTOR : 1
30- KAFKA_CONFLUENT_BALANCER_TOPIC_REPLICATION_FACTOR : 1
3116 KAFKA_TRANSACTION_STATE_LOG_MIN_ISR : 1
3217 KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR : 1
3318 KAFKA_JMX_PORT : 9101
3419 KAFKA_JMX_HOSTNAME : localhost
35- KAFKA_CONFLUENT_SCHEMA_REGISTRY_URL : http://schema-registry:8081
36- CONFLUENT_METRICS_REPORTER_BOOTSTRAP_SERVERS : broker:29092
37- CONFLUENT_METRICS_REPORTER_TOPIC_REPLICAS : 1
38- CONFLUENT_METRICS_ENABLE : ' true'
39- CONFLUENT_SUPPORT_CUSTOMER_ID : ' anonymous'
20+ KAFKA_PROCESS_ROLES : ' broker,controller'
21+ KAFKA_CONTROLLER_QUORUM_VOTERS : ' 1@broker:29093'
22+ KAFKA_LISTENERS : ' PLAINTEXT://broker:29092,CONTROLLER://broker:29093,PLAINTEXT_HOST://0.0.0.0:9092'
23+ KAFKA_INTER_BROKER_LISTENER_NAME : ' PLAINTEXT'
24+ KAFKA_CONTROLLER_LISTENER_NAMES : ' CONTROLLER'
25+ KAFKA_LOG_DIRS : ' /tmp/kraft-combined-logs'
26+ # Replace CLUSTER_ID with a unique base64 UUID using "bin/kafka-storage.sh random-uuid"
27+ # See https://docs.confluent.io/kafka/operations-tools/kafka-tools.html#kafka-storage-sh
28+ CLUSTER_ID : ' MkU3OEVBNTcwNTJENDM2Qk'
29+ healthcheck :
30+ test : echo srvr | nc broker 9092 || exit 1
31+ interval : 5s
32+ retries : 10
4033
4134 schema-registry :
42- image : confluentinc/cp-schema-registry:7.2 .0
35+ image : confluentinc/cp-schema-registry:7.7 .0
4336 hostname : schema-registry
4437 container_name : schema-registry
4538 depends_on :
@@ -50,9 +43,13 @@ services:
5043 SCHEMA_REGISTRY_HOST_NAME : schema-registry
5144 SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS : ' broker:29092'
5245 SCHEMA_REGISTRY_LISTENERS : http://0.0.0.0:8081
46+ healthcheck :
47+ interval : 5s
48+ retries : 10
49+ test : curl --write-out 'HTTP %{http_code}' --fail --silent --output /dev/null http://localhost:8081
5350
5451 connect :
55- # image: fieldengineering/redis-kafka-connect
52+ image : fieldengineering/redis-kafka-connect
5653 build :
5754 context : .
5855 hostname : connect
@@ -82,9 +79,15 @@ services:
8279 CONNECT_CONSUMER_INTERCEPTOR_CLASSES : " io.confluent.monitoring.clients.interceptor.MonitoringConsumerInterceptor"
8380 CONNECT_PLUGIN_PATH : " /usr/share/java,/usr/share/confluent-hub-components"
8481 CONNECT_LOG4J_LOGGERS : org.apache.zookeeper=ERROR,org.I0Itec.zkclient=ERROR,org.reflections=ERROR
82+ volumes :
83+ - ./core/redis-kafka-connect/build/confluentArchive/redis-redis-kafka-connect-1.0.0-SNAPSHOT:/usr/share/confluent-hub-components/redis-redis-kafka-connect
84+ healthcheck :
85+ interval : 5s
86+ retries : 10
87+ test : curl --write-out 'HTTP %{http_code}' --fail --silent --output /dev/null http://localhost:8083
8588
8689 control-center :
87- image : confluentinc/cp-enterprise-control-center:7.2 .0
90+ image : confluentinc/cp-enterprise-control-center:7.7 .0
8891 hostname : control-center
8992 container_name : control-center
9093 depends_on :
@@ -105,9 +108,13 @@ services:
105108 CONTROL_CENTER_MONITORING_INTERCEPTOR_TOPIC_PARTITIONS : 1
106109 CONFLUENT_METRICS_TOPIC_REPLICATION : 1
107110 PORT : 9021
111+ healthcheck :
112+ interval : 5s
113+ retries : 10
114+ test : curl --write-out 'HTTP %{http_code}' --fail --silent --output /dev/null http://localhost:9021
108115
109116 ksqldb-server :
110- image : confluentinc/cp-ksqldb-server:7.2 .0
117+ image : confluentinc/cp-ksqldb-server:7.7 .0
111118 hostname : ksqldb-server
112119 container_name : ksqldb-server
113120 depends_on :
@@ -128,9 +135,13 @@ services:
128135 KSQL_KSQL_LOGGING_PROCESSING_TOPIC_REPLICATION_FACTOR : 1
129136 KSQL_KSQL_LOGGING_PROCESSING_TOPIC_AUTO_CREATE : ' true'
130137 KSQL_KSQL_LOGGING_PROCESSING_STREAM_AUTO_CREATE : ' true'
138+ healthcheck :
139+ interval : 5s
140+ retries : 10
141+ test : curl --write-out 'HTTP %{http_code}' --fail --silent --output /dev/null http://localhost:8088
131142
132143 rest-proxy :
133- image : confluentinc/cp-kafka-rest:7.2 .0
144+ image : confluentinc/cp-kafka-rest:7.7 .0
134145 depends_on :
135146 - broker
136147 - schema-registry
@@ -143,10 +154,20 @@ services:
143154 KAFKA_REST_BOOTSTRAP_SERVERS : ' broker:29092'
144155 KAFKA_REST_LISTENERS : " http://0.0.0.0:8082"
145156 KAFKA_REST_SCHEMA_REGISTRY_URL : ' http://schema-registry:8081'
146-
157+ healthcheck :
158+ interval : 5s
159+ retries : 10
160+ test : curl --write-out 'HTTP %{http_code}' --fail --silent --output /dev/null http://localhost:8082
161+
147162 redis :
148163 image : redis/redis-stack-server
149164 hostname : redis
150165 container_name : redis
151166 ports :
152- - " 6379:6379"
167+ - " 6379:6379"
168+ healthcheck :
169+ test : [ "CMD-SHELL", "redis-cli ping | grep PONG" ]
170+ interval : 10s
171+ retries : 5
172+ start_period : 5s
173+ timeout : 5s
0 commit comments