-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-single.yml
69 lines (66 loc) · 2.34 KB
/
docker-compose-single.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
---
## Single Broker NO Public IP
version: '2'
services:
zookeeper:
image: confluentinc/cp-zookeeper:6.2.0
hostname: zookeeper.local
container_name: zookeeper
restart: always
ports:
- "2181:2181"
volumes:
- ./zookeeper/zk-data:/var/lib/zookeeper/data
- ./zookeeper/zk-txn-logs:/var/lib/zookeeper/log
environment:
ZOOKEEPER_SERVER_ID: 1
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
broker1:
image: confluentinc/cp-kafka:6.2.0
hostname: broker1.local
container_name: broker1
restart: always
volumes:
- ./broker1/kafka-data:/var/lib/kafka/data
- ./secrets:/etc/kafka/secrets
ports:
- "29092:29092"
- "9092:9092"
- "9102:9102" # JMX Ready
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper.local:2181'
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_LISTENERS: 'PLAINTEXT://broker1.local:29092,PLAINTEXT_HOST://broker1.local:9092'
KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT://broker1.local:29092,PLAINTEXT_HOST://localhost:9092'
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'false'
KAFKA_LOG4J_LOGGERS: 'kafka.controller=INFO,kafka.producer.async.DefaultEventHandler=INFO,state.change.logger=INFO'
KAFKA_CONFLUENT_SCHEMA_REGISTRY_URL: 'http://schema-registry.local:8081'
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 100
KAFKA_LOG_RETENTION_BYTES: 314572800
KAFKA_LOG_RETENTION_MS: 86400000 # 1 day
KAFKA_LOG_SEGMENT_BYTES: 31457280
depends_on:
- zookeeper
schema-registry:
image: confluentinc/cp-schema-registry:6.2.0
hostname: schema-registry.local
container_name: schema-registry
restart: always
ports:
- "8081:8081"
environment:
SCHEMA_REGISTRY_HOST_NAME: schema-registry.local
SCHEMA_REGISTRY_KAFKASTORE_CONNECTION_URL: 'zookeeper.local:2181'
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: 'PLAINTEXT://broker1.local:29092'
SCHEMA_REGISTRY_LISTENERS: 'http://0.0.0.0:8081'
volumes:
- /data/secrets:/etc/schema-registry/secrets
depends_on:
- zookeeper
- broker1