-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathdocker-compose.yml
75 lines (68 loc) · 1.5 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
version: "3.7"
services:
zookeeper:
image: zookeeper:3.6.1
container_name: zookeeper
expose:
- "2181"
volumes:
- kafka_zookeeper:/opt/zookeeper-3.6.1/data
networks:
kafkanet:
ipv4_address: 172.25.0.11
kafka1:
image: wurstmeister/kafka:2.12-2.2.0
container_name: kafka1
command: [start-kafka.sh]
expose:
- "8080"
- "9092"
environment:
KAFKA_ADVERTISED_HOST_NAME: 172.25.0.12
KAFKA_ZOOKEEPER_CONNECT: 172.25.0.11:2181
KAFKA_ADVERTISED_PORT: 9092
volumes:
- kafka_kafka1:/opt/kafka_2.12-2.2.0/logs
networks:
kafkanet:
ipv4_address: 172.25.0.12
depends_on:
- "zookeeper"
kafka2:
image: wurstmeister/kafka:2.12-2.2.0
container_name: kafka2
command: [start-kafka.sh]
expose:
- "8080"
- "9092"
environment:
KAFKA_ADVERTISED_HOST_NAME: 172.25.0.13
KAFKA_ZOOKEEPER_CONNECT: 172.25.0.11:2181
KAFKA_ADVERTISED_PORT: 9092
volumes:
- kafka_kafka2:/opt/kafka_2.12-2.2.0/logs
depends_on:
- "zookeeper"
networks:
kafkanet:
ipv4_address: 172.25.0.13
spark:
image: gettyimages/spark:2.4.1-hadoop-3.0
container_name: spark
volumes:
- ./:/app
networks:
kafkanet:
ipv4_address: 172.25.0.14
networks:
kafkanet:
name: kafkanet
driver: bridge
ipam:
driver: default
config:
- subnet: 172.25.0.0/16
volumes:
kafka_zookeeper:
kafka_kafka1:
kafka_kafka2: