Skip to content

Commit

Permalink
feat: add docker setup for kafka
Browse files Browse the repository at this point in the history
  • Loading branch information
Angular2Guy committed Aug 12, 2024
1 parent 56e5650 commit 6bca2cc
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions runKafka.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 6bca2cc

Please sign in to comment.