From 6bca2cc055d8adea24eff87989d8af2ec952c9a7 Mon Sep 17 00:00:00 2001 From: Angular2guy Date: Mon, 12 Aug 2024 20:37:43 +0200 Subject: [PATCH] feat: add docker setup for kafka --- runKafka.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 runKafka.sh diff --git a/runKafka.sh b/runKafka.sh new file mode 100644 index 0000000..095d46b --- /dev/null +++ b/runKafka.sh @@ -0,0 +1,14 @@ +#!/bin/sh +# network config for KRaft +docker network create app-tier --driver bridge +# Kafka with KRaft +docker run -d --name kafka-server \ + --hostname kafka-server \ + --network app-tier \ + -e KAFKA_CFG_NODE_ID=0 \ + -e KAFKA_CFG_PROCESS_ROLES=controller,broker \ + -e KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093 \ + -e KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT \ + -e KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=0@kafka-server:9093 \ + -e KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER \ + bitnami/kafka:latest \ No newline at end of file