-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
48 lines (48 loc) · 1.36 KB
/
docker-compose.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
# Example working docker-compose file
version: "3.2"
services:
zookeeper:
image: wurstmeister/zookeeper:3.4.6
platform: 'linux/amd64'
ports:
- "2181:2181"
kafka1:
image: wurstmeister/kafka:2.11-1.1.1
platform: 'linux/amd64'
ports:
- "9092:9092"
depends_on:
- zookeeper
environment:
KAFKA_CREATE_TOPICS: "topic1:12:3, topic2:12:3, atopic3:12:3"
KAFKA_LISTENERS: "PLAINTEXT://0.0.0.0:9092"
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://${DOCKER_IP}:9092
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
volumes:
- /var/run/docker.sock:/var/run/docker.sock
kafka2:
image: wurstmeister/kafka:2.11-1.1.1
platform: 'linux/amd64'
ports:
- "9093:9092"
depends_on:
- zookeeper
environment:
KAFKA_LISTENERS: "PLAINTEXT://0.0.0.0:9092"
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://${DOCKER_IP}:9093
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
volumes:
- /var/run/docker.sock:/var/run/docker.sock
kafka3:
image: wurstmeister/kafka:2.11-1.1.1
platform: 'linux/amd64'
ports:
- "9094:9092"
depends_on:
- zookeeper
environment:
KAFKA_LISTENERS: "PLAINTEXT://0.0.0.0:9092"
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://${DOCKER_IP}:9094
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
volumes:
- /var/run/docker.sock:/var/run/docker.sock