0% found this document useful (0 votes)
7 views

Docker Compose

Uploaded by

axel mwenze
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Docker Compose

Uploaded by

axel mwenze
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

version: '2'

services:
zookeeper:
image: confluentinc/cp-zookeeper:latest
networks:
kafka:
hostname: zookeeper
ports:
- 2181:2181
environment:
ZOO_MY_ID: 1
ZOO_PORT: 2181
ZOOKEEPER_CLIENT_PORT: 2181
#ZOO_SERVERS: server.1=zookeeper:2888:3888
volumes:
- ./data/zookeeper/data:/data
- ./data/zookeeper/datalog:/datalog

kafka:
image: confluentinc/cp-kafka:4.0.0
networks:
kafka:
hostname: kafka
ports:
- 9092:9092
environment:
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
KAFKA_ADVERTISED_HOST_NAME: kafka
KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181"
KAFKA_BROKER_ID: 1
KAFKA_LOG4J_LOGGERS:
kafka.controller=INFO,kafka.producer.async.DefaultEventHandler=INFO,state.change.lo
gger=INFO
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_REPLICA_FETCH_MAX_BYTES: 100000000
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
KAFKA_DEFAULT_REPLICATION_STATUS: 3
volumes:
- ./data/kafka/data:/var/lib/kafka/data

rest:
image: confluentinc/cp-kafka-rest:4.0.0
networks:
kafka:
ports:
- 8082:8082
environment:
KAFKA_REST_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_REST_LISTENERS: http://rest:8082
KAFKA_REST_SCHEMA_REGISTRY_URL: http://registry:8081
KAFKA_REST_HOST_NAME: rest
depends_on:
- kafka
- zookeeper

You might also like