-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
120 lines (89 loc) · 2.53 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.7"
services:
app:
build:
context: ./
dockerfile: ./Dockerfile
image: replicator
depends_on:
- replicator_zookeeper_1
- replicator_zookeeper_2
- replicator_kafka_1
- replicator_kafka_2
volumes:
- ./:/app/
command: cargo run --bin=replicator -- --config=fixtures/example_config.yml -p 9445 -h 0.0.0.0
ports:
- 9444:9444
- 9445:9445
networks:
replicator_rust_env_network:
aliases:
- replicator-app.test
replicator_zookeeper_1:
image: wurstmeister/zookeeper
ports:
- 2181:2181
networks:
replicator_rust_env_network:
aliases:
- replicator-zookeeper-1.test
replicator_zookeeper_2:
image: wurstmeister/zookeeper
ports:
- 2182:2181
networks:
replicator_rust_env_network:
aliases:
- replicator-zookeeper-2.test
replicator_kafka_1:
image: wurstmeister/kafka:2.11-1.1.0
depends_on:
- replicator_zookeeper_1
ports:
- 9092:9092
environment:
#KAFKA_ADVERTISED_HOST_NAME: 127.0.0.1
HOSTNAME_COMMAND: "route -n | awk '/UG[ \t]/{print $$2}'"
KAFKA_CREATE_TOPICS: "replicator-logs:1:1,topic1:3:1,topic2:3:1,topic3:3:1"
KAFKA_ZOOKEEPER_CONNECT: replicator-zookeeper-1.test:2181
# BROKER_ID_COMMAND: "hostname | awk -F'-' '{print $$2}'"
KAFKA_BROKER_ID: 1
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
replicator_rust_env_network:
aliases:
- replicator-kafka-1.test
replicator_kafka_2:
image: wurstmeister/kafka:2.11-1.1.0
depends_on:
- replicator_zookeeper_2
ports:
- 9093:9092
environment:
#KAFKA_ADVERTISED_HOST_NAME: 127.0.0.1
HOSTNAME_COMMAND: "route -n | awk '/UG[ \t]/{print $$2}'"
KAFKA_CREATE_TOPICS: "replicator-logs:1:1,topic1:3:1,topic2:3:1,topic3:3:1"
KAFKA_ZOOKEEPER_CONNECT: replicator-zookeeper-2.test:2181
# BROKER_ID_COMMAND: "hostname | awk -F'-' '{print $$2}'"
KAFKA_BROKER_ID: 2
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
replicator_rust_env_network:
aliases:
- replicator-kafka-2.test
replicator_kafkacat:
image: edenhill/kafkacat:1.5.0
volumes:
- ./:/app/
environment:
KAFKA_HOST: replicator-kafka-1.test
entrypoint: /bin/sh
networks:
replicator_rust_env_network:
aliases:
- replicator-kafkacat-1.test
networks:
replicator_rust_env_network: