-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
120 lines (116 loc) · 3.22 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
version: "3.9"
services:
zoo1:
build: zookeeper
ports:
- "127.0.0.11:2180:2180"
volumes:
- "$PWD/kafka_distr:/opt/kafka"
- "$PWD/zookeeper/data/zoo1:/opt/zookeeper"
- "$PWD/prometheus:/opt/prometheus"
hostname: zoo1
networks:
- kafka-lab
environment:
JMX_PORT: 9093
EXTRA_ARGS: "-javaagent:/opt/prometheus/jmx_prometheus_javaagent-0.15.0.jar=16100:/opt/prometheus/zookeeper.yml"
zoo2:
build: zookeeper
ports:
- "127.0.0.12:2180:2180"
volumes:
- "$PWD/kafka_distr:/opt/kafka"
- "$PWD/zookeeper/data/zoo2:/opt/zookeeper"
- "$PWD/prometheus:/opt/prometheus"
hostname: zoo2
networks:
- kafka-lab
environment:
JMX_PORT: 9093
EXTRA_ARGS: "-javaagent:/opt/prometheus/jmx_prometheus_javaagent-0.15.0.jar=16100:/opt/prometheus/zookeeper.yml"
zoo3:
build: zookeeper
ports:
- "127.0.0.13:2180:2180"
volumes:
- "$PWD/kafka_distr:/opt/kafka"
- "$PWD/zookeeper/data/zoo3:/opt/zookeeper"
- "$PWD/prometheus:/opt/prometheus"
hostname: zoo3
networks:
- kafka-lab
environment:
JMX_PORT: 9093
EXTRA_ARGS: "-javaagent:/opt/prometheus/jmx_prometheus_javaagent-0.15.0.jar=16100:/opt/prometheus/zookeeper.yml"
kafka1:
build: kafka_server
ports:
- "127.0.0.21:16100:16100"
volumes:
- "$PWD/kafka_distr:/opt/kafka"
- "$PWD/kafka_server/logs1:/logs/kafka"
- "$PWD/prometheus:/opt/prometheus"
depends_on:
- zoo1
- zoo2
- zoo3
hostname: kafka1
networks:
- kafka-lab
environment:
JMX_PORT: 9093
EXTRA_ARGS: "-javaagent:/opt/prometheus/jmx_prometheus_javaagent-0.15.0.jar=16100:/opt/prometheus/kafka_broker.yml"
command: ["bin/kafka-server-start.sh", "config/server.properties", "--override", "broker.id=1"]
kafka2:
build: kafka_server
ports:
- "127.0.0.22:16100:16100"
volumes:
- "$PWD/kafka_distr:/opt/kafka"
- "$PWD/kafka_server/logs2:/logs/kafka"
- "$PWD/prometheus:/opt/prometheus"
depends_on:
- zoo1
- zoo2
- zoo3
hostname: kafka2
networks:
- kafka-lab
environment:
JMX_PORT: 9093
EXTRA_ARGS: "-javaagent:/opt/prometheus/jmx_prometheus_javaagent-0.15.0.jar=16100:/opt/prometheus/kafka_broker.yml"
command: ["bin/kafka-server-start.sh", "config/server.properties", "--override", "broker.id=2"]
kafka3:
build: kafka_server
ports:
- "127.0.0.23:16100:16100"
volumes:
- "$PWD/kafka_distr:/opt/kafka"
- "$PWD/kafka_server/logs3:/logs/kafka"
- "$PWD/prometheus:/opt/prometheus"
depends_on:
- zoo1
- zoo2
- zoo3
hostname: kafka3
networks:
- kafka-lab
environment:
JMX_PORT: 9093
EXTRA_ARGS: "-javaagent:/opt/prometheus/jmx_prometheus_javaagent-0.15.0.jar=16100:/opt/prometheus/kafka_broker.yml"
command: ["bin/kafka-server-start.sh", "config/server.properties", "--override", "broker.id=3"]
phpfront1:
build: php
volumes:
- "$PWD/php/src:/var/www"
networks:
- kafka-lab
phpcli1:
build: php
volumes:
- "$PWD/php/src:/var/www"
networks:
- kafka-lab
networks:
kafka-lab:
name: "kafka-lab"