-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserver1.yml
46 lines (46 loc) · 1.38 KB
/
server1.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
version: "3.5"
services:
zookeeper:
image: confluentinc/cp-zookeeper:5.5.0
container_name: zookeeper
ports:
- 2181:2181
- 2888:2888
- 3888:3888
networks:
- kafka-network
environment:
ZOOKEEPER_SERVER_ID: 1
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
ZOOKEEPER_INIT_LIMIT: 10
ZOOKEEPER_SYNC_LIMIT: 5
ZOOKEEPER_SERVERS: "0.0.0.0:2888:3888;10.7.27.18:2888:3888;10.7.27.19:2888:3888"
volumes:
- ./data/zookeeper1/data:/var/lib/zookeeper/data
- ./data/zookeeper1/log:/var/lib/zookeeper/log
kafka:
image: confluentinc/cp-kafka:5.5.0
container_name: kafka
ports:
- 9092:9092
- 19092:19092
networks:
- kafka-network
depends_on:
- zookeeper
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181,10.7.27.18:2181,10.7.27.19:2182
KAFKA_LISTENERS: INTERNAL://:9092,EXTERNAL://:19092
KAFKA_ADVERTISED_LISTENERS: INTERNAL://10.7.27.17:9092,EXTERNAL://139.150.75.238:19092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: EXTERNAL:PLAINTEXT,INTERNAL:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false"
KAFKA_DEFAULT_REPLICATION_FACTOR: 3
KAFKA_MIN_INSYNC_REPLICAS: 2
volumes:
- ./data/kafka1:/var/lib/kafka/data
networks:
kafka-network:
name: kafka-network