This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets-examples.git

commit b87f145369011738ed8c5f84dd44e8d4a9edeed4
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Sun Jan 8 09:16:15 2023 +0100

    Add start script and polished example
---
 jbang/kafka-health/docker-compose.yml | 27 +++++++++++++--------------
 jbang/kafka-health/start.sh           |  7 +++++++
 2 files changed, 20 insertions(+), 14 deletions(-)

diff --git a/jbang/kafka-health/docker-compose.yml 
b/jbang/kafka-health/docker-compose.yml
index e38291b..f62b0ee 100644
--- a/jbang/kafka-health/docker-compose.yml
+++ b/jbang/kafka-health/docker-compose.yml
@@ -2,26 +2,25 @@
 version: '3'
 services:
   zookeeper:
-    image: confluentinc/cp-zookeeper:7.0.7
+    image: confluentinc/cp-zookeeper:latest
     container_name: zookeeper
+    ports:
+      - "2181:2181"
     environment:
       ZOOKEEPER_CLIENT_PORT: 2181
       ZOOKEEPER_TICK_TIME: 2000
 
-  broker:
-    image: confluentinc/cp-kafka:7.0.7
-    container_name: broker
-    ports:
-      # To learn about configuring Kafka for access across networks see
-      # 
https://www.confluent.io/blog/kafka-client-cannot-connect-to-broker-on-aws-on-docker-etc/
-      - "9092:9092"
+  kafka:
+    container_name: kafka
+    image: confluentinc/cp-kafka:latest
     depends_on:
       - zookeeper
+    ports:
+      - "9092:9092"
     environment:
       KAFKA_BROKER_ID: 1
-      KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
-      KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: 
PLAINTEXT:PLAINTEXT,PLAINTEXT_INTERNAL:PLAINTEXT
-      KAFKA_ADVERTISED_LISTENERS: 
PLAINTEXT://localhost:9092,PLAINTEXT_INTERNAL://broker:29092
-      KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
-      KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
-      KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
\ No newline at end of file
+      KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
+      KAFKA_ADVERTISED_LISTENERS: 
PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092
+      KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: 
PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
+      KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
+      KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
\ No newline at end of file
diff --git a/jbang/kafka-health/start.sh b/jbang/kafka-health/start.sh
new file mode 100755
index 0000000..ccb09e3
--- /dev/null
+++ b/jbang/kafka-health/start.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+docker-compose down
+docker rm -f $(docker ps -a -q)
+docker volume rm $(docker volume ls -q)
+docker-compose up -d
+docker-compose logs -f
\ No newline at end of file

Reply via email to