0% found this document useful (0 votes)
7 views1 page

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 views1 page

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

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:
[Link]=INFO,[Link]=INFO,[Link]
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: [Link]
KAFKA_REST_SCHEMA_REGISTRY_URL: [Link]
KAFKA_REST_HOST_NAME: rest
depends_on:
- kafka
- zookeeper

You might also like