From 6a2f4214082b9e5e8c9b4065baad23bc26754241 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Br=C3=BCderl?= Date: Tue, 26 May 2020 22:19:28 +0200 Subject: [PATCH] add docker-compose for kafka setup (debugging) --- Makefile | 2 ++ docker-compose.yaml | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 docker-compose.yaml diff --git a/Makefile b/Makefile index 853455f8..5819a04b 100644 --- a/Makefile +++ b/Makefile @@ -4,3 +4,5 @@ install: GO111MODULE=on go install -ldflags "-w -s" ./cmd/kaf release: rm -rf dist/ && goreleaser +run-kafka: + docker-compose up -d diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 00000000..a45a7c9b --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,20 @@ +version: "3.2" +services: + zookeeper: + image: confluentinc/cp-zookeeper:latest + environment: + ZOOKEEPER_CLIENT_PORT: 2181 + ZOOKEEPER_TICK_TIME: 2000 + kafka: + image: confluentinc/cp-kafka:latest + depends_on: + - zookeeper + ports: + - 9092:9092 + environment: + KAFKA_BROKER_ID: 1 + 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