Skip to content

Commit

Permalink
beter docker
Browse files Browse the repository at this point in the history
  • Loading branch information
mensfeld committed Sep 22, 2023
1 parent ec169f4 commit f0d3d8c
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
version: '2'

services:
zookeeper:
image: wurstmeister/zookeeper
ports:
- "2181:2181"
container_name: waterdrop_zookeeper
image: confluentinc/cp-zookeeper:7.5.0
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 100

kafka:
image: wurstmeister/kafka:2.12-2.5.0
container_name: waterdrop_zookeeper
image: confluentinc/cp-kafka:7.5.0
depends_on:
- zookeeper
ports:
- "9092:9092"
- 9092:9092
environment:
KAFKA_ADVERTISED_HOST_NAME: localhost
KAFKA_ADVERTISED_PORT: 9092
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true'
KAFKA_CREATE_TOPICS: 'example_topic:1:1'
volumes:
- /var/run/docker.sock:/var/run/docker.sock
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost: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

0 comments on commit f0d3d8c

Please sign in to comment.