Skip to content

Instantly share code, notes, and snippets.

@vipmax
Last active October 8, 2024 19:53
Show Gist options
  • Save vipmax/c42b5121e584895731f001f3c2b15cbc to your computer and use it in GitHub Desktop.
Save vipmax/c42b5121e584895731f001f3c2b15cbc to your computer and use it in GitHub Desktop.
minimal docker-compose apache kafka broker and kafka-ui
version: '3.8'
networks:
my_network:
driver: bridge
volumes:
kafka-data:
kafka-ui-data:
services:
broker:
image: confluentinc/confluent-local:latest
hostname: broker
networks: [my_network]
container_name: broker
volumes: [kafka-data:/var/lib/kafka/data]
ports: ["8082:8082", "9092:9092"]
environment:
KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT://broker:29092,PLAINTEXT_HOST://localhost:9092'
KAFKA_CONTROLLER_QUORUM_VOTERS: '1@broker:29093'
KAFKA_LISTENERS: 'PLAINTEXT://broker:29092,CONTROLLER://broker:29093,PLAINTEXT_HOST://0.0.0.0:9092'
kafka-ui:
image: provectuslabs/kafka-ui:latest
networks: [my_network]
volumes: [kafka-ui-data:/var/lib/kafka-ui]
ports: [9999:8080]
environment:
DYNAMIC_CONFIG_ENABLED: true
KAFKA_CLUSTERS_0_NAME: local
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: broker:29092
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment