-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
208 lines (198 loc) · 5.95 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
version: "3.9"
services:
db-g06-tests:
container_name: db-g06-tests
hostname: db-g06-tests
build:
context: code/gateway-hub
dockerfile: docker/gateway/Dockerfile-db-test
environment:
- POSTGRES_USER=gateway_user
- POSTGRES_PASSWORD=gateway_password
- POSTGRES_DB=gateway_db
ports:
- "5432:5432"
spring-service-1:
container_name: spring-service-1
hostname: spring-service-1
build:
context: code/gateway-hub
dockerfile: docker/gateway/Dockerfile-spring
environment:
PORT: 8081
KAFKA-SERVERS: "kafka-1:9092,kafka-2:9092,kafka-3:9092"
POSTGRES-URL: "jdbc:postgresql://db-g06-tests:5432/gateway_db"
POSTGRES-USER: "gateway_user"
POSTGRES-PWD: "gateway_password"
OWNER-NAME: "owner"
OWNER-TOKEN: "348fd1e9-d401-4f4a-b4ab-917297d522c7"
AUTH-SERVER-URI: "http://host.docker.internal:8089/authenticate"
ports:
- "8081:8081"
depends_on:
- db-g06-tests
- zookeeper-1
- zookeeper-2
- zookeeper-3
- kafka-1
- kafka-2
- kafka-3
spring-service-2:
container_name: spring-service-2
hostname: spring-service-2
build:
context: code/gateway-hub
dockerfile: docker/gateway/Dockerfile-spring
environment:
PORT: 8082
KAFKA-SERVERS: "kafka-1:9092,kafka-2:9092,kafka-3:9092"
POSTGRES-URL: "jdbc:postgresql://db-g06-tests:5432/gateway_db"
POSTGRES-USER: "gateway_user"
POSTGRES-PWD: "gateway_password"
OWNER-NAME: "owner"
OWNER-TOKEN: "348fd1e9-d401-4f4a-b4ab-917297d522c7"
AUTH-SERVER-URI: "http://host.docker.internal:8089/authenticate"
ports:
- "8082:8082"
depends_on:
- db-g06-tests
- spring-service-1
- zookeeper-1
- zookeeper-2
- zookeeper-3
- kafka-1
- kafka-2
- kafka-3
streams-service-1:
container_name: streams-service-1
hostname: streams-service-1
build:
context: code/record-router
dockerfile: docker/Dockerfile-streams
environment:
PORT: 8090
KAFKA-SERVERS: "kafka-1:9092,kafka-2:9092,kafka-3:9092"
ports:
- "8090:8090"
depends_on:
- spring-service-1
- db-g06-tests
- zookeeper-1
- zookeeper-2
- zookeeper-3
- kafka-1
- kafka-2
- kafka-3
streams-service-2:
container_name: streams-service-2
hostname: streams-service-2
build:
context: code/record-router
dockerfile: docker/Dockerfile-streams
environment:
PORT: 8091
KAFKA-SERVERS: "kafka-1:9092,kafka-2:9092,kafka-3:9092"
ports:
- "8091:8091"
depends_on:
- spring-service-1
- db-g06-tests
- zookeeper-1
- zookeeper-2
- zookeeper-3
- kafka-1
- kafka-2
- kafka-3
zookeeper-1:
container_name: zookeeper-1
hostname: zookeeper-1
image: bitnami/zookeeper:3.8
ports:
- '21811:2181'
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
- ZOO_SERVER_ID=1
- ZOO_SERVERS=0.0.0.0:2888:3888,zookeeper-2:2888:3888,zookeeper-3:2888:3888
zookeeper-2:
container_name: zookeeper-2
hostname: zookeeper-2
image: bitnami/zookeeper:3.8
ports:
- '21812:2181'
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
- ZOO_SERVER_ID=2
- ZOO_SERVERS=zookeeper-1:2888:3888,0.0.0.0:2888:3888,zookeeper-3:2888:3888
zookeeper-3:
container_name: zookeeper-3
hostname: zookeeper-3
image: bitnami/zookeeper:3.8
ports:
- '21813:2181'
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
- ZOO_SERVER_ID=3
- ZOO_SERVERS=zookeeper-1:2888:3888,zookeeper-2:2888:3888,0.0.0.0:2888:3888
kafka-1:
image: 'bitnami/kafka:3.4'
ports:
- '29092:29092'
environment:
- KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
# - KAFKA_INTER_BROKER_LISTENER_NAME=PLAINTEXT - ALREADY DEFAULT
- KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1
- KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka-1:9092,PLAINTEXT_HOST://localhost:29092
- KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,PLAINTEXT_HOST://:29092
- KAFKA_BROKER_ID=1
- KAFKA_ZOOKEEPER_CONNECT=zookeeper-1:2181,zookeeper-2:2181,zookeeper-3:2181
- ALLOW_PLAINTEXT_LISTENER=yes
depends_on:
- zookeeper-1
- zookeeper-2
- zookeeper-3
kafka-2:
image: 'bitnami/kafka:3.4'
ports:
- '39092:39092'
environment:
- KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
# - KAFKA_INTER_BROKER_LISTENER_NAME=PLAINTEXT - ALREADY DEFAULT
- KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1
- KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka-2:9092,PLAINTEXT_HOST://localhost:39092
- KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,PLAINTEXT_HOST://:39092
- KAFKA_BROKER_ID=2
- KAFKA_ZOOKEEPER_CONNECT=zookeeper-1:2181,zookeeper-2:2181,zookeeper-3:2181
- ALLOW_PLAINTEXT_LISTENER=yes
depends_on:
- zookeeper-1
- zookeeper-2
- zookeeper-3
kafka-3:
image: 'bitnami/kafka:3.4'
ports:
- '49092:49092'
environment:
- KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
# - KAFKA_INTER_BROKER_LISTENER_NAME=PLAINTEXT - ALREADY DEFAULT
- KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1
- KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka-3:9092,PLAINTEXT_HOST://localhost:49092
- KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,PLAINTEXT_HOST://:49092
- KAFKA_BROKER_ID=3
- KAFKA_ZOOKEEPER_CONNECT=zookeeper-1:2181,zookeeper-2:2181,zookeeper-3:2181
- ALLOW_PLAINTEXT_LISTENER=yes
depends_on:
- zookeeper-1
- zookeeper-2
- zookeeper-3
# The service running the load-balancer
nginx:
container_name: nginx
image: nginx
ports:
- "8080:8080"
- "8088:8088"
volumes:
- ./code/gateway-hub/docker/gateway/nginx:/etc/nginx
depends_on:
- spring-service-1
- spring-service-2