-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
256 lines (237 loc) · 6.45 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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
version: '3.8'
services:
redis:
image: "redis:alpine"
container_name: redis
restart: unless-stopped
ports:
- 6379:6379
booking-process:
build: ./bookingProcessAPI
image: cargoverload/booking-process
restart: unless-stopped
container_name: booking-process
environment:
- PORT=80
- CAR_SEARCHING_PORT=80
- CAR_SEARCHING_HOST=searching-aggregator
- CAR_BOOKING_PORT=80
- CAR_BOOKING_HOST=car-booking
- KAFKA=kafka-service:9092
- REDIS=redis:6379
volumes:
- ./bookingProcessAPI/src/:/app/src/ # FOR HOT RELOAD ONLY
depends_on:
- redis
- kafka-service
expose:
- 80
labels:
- "traefik.http.routers.booking-process.rule=PathPrefix(`/booking-process`)"
order-validator:
build: ./orderValidator
image: cargoverload/order-validator
restart: unless-stopped
container_name: order-validator
environment:
- KAFKA=kafka-service:9092
depends_on:
- kafka-service
offers-creator:
build: ./offersCreator
image: cargoverload/offers-creator
restart: unless-stopped
container_name: offers-creator
environment:
- KAFKA=kafka-service:9092
depends_on:
- kafka-service
car-availability:
build: ./carAvailability
image: cargoverload/car-availability
restart: unless-stopped
container_name: car-availability
environment:
- REDIS=redis:6379
- KAFKA=kafka-service:9092
- REDIS_DB=1
depends_on:
- car-booking
- redis
- kafka-service
car-booking:
build: ./carBooking
image: cargoverload/car-booking
restart: unless-stopped
container_name: car-booking
environment:
- KAFKA=kafka-service:9092
- REDIS=redis:6379
- REDIS_DB=1
depends_on:
- redis
- kafka-service
searching-aggregator:
build: ./searchingAggregator
image: cargoverload/searching-aggregator
restart: unless-stopped
container_name: searching-aggregator
environment:
- KAFKA=kafka-service:9092
depends_on:
- car-availability
- car-location
- kafka-service
multiple-searching-aggregator:
build: ./multipleSearchingAggregator
image: cargoverload/multiple-searching-aggregator
restart: unless-stopped
container_name: multiple-searching-aggregator
environment:
- KAFKA=kafka-service:9092
depends_on:
- searching-aggregator
- kafka-service
car-tracking:
build: ./carTracking
image: cargoverload/car-tracking
restart: unless-stopped
container_name: car-tracking
environment:
- PORT=80
expose:
- 80
labels:
- "traefik.http.routers.car-tracking.rule=PathPrefix(`/car-tracking`)"
car-location:
build: ./carLocation
image: cargoverload/car-location
restart: unless-stopped
container_name: car-location
environment:
- PORT=80
- NEO4J_HOST=neo4j
- KAFKA_HOST=kafka-service
- KAFKA_PORT=9092
- CAR_TRACKING_PORT=80
- CAR_TRACKING_HOST=car-tracking
depends_on:
- neo4j
- kafka-service
expose:
- 80
labels:
- "traefik.http.routers.car-location.rule=PathPrefix(`/car-location`)"
itineraryDispatcher:
build: ./itineraryDispatcher
image: cargoverload/itinerary-dispatcher
restart: unless-stopped
container_name: itinerary-dispatcher
environment:
- KAFKA_HOST=kafka-service:9092
volumes:
- ./itineraryDispatcher/src/:/app/src/ # FOR HOT RELOAD ONLY
depends_on:
- kafka-service
neo4j:
image: neo4j:4.1.3
restart: unless-stopped
container_name: cargoverload-neo4j
ports:
- 7474:7474
- 7687:7687
expose:
- 7474
- 7687
# volumes:
# - ./conf:/conf
# - ./data:/data
# - ./import:/import
# - ./logs:/logs
# - ./plugins:/plugins
environment:
NEO4J_AUTH: 'neo4j/superpassword'
# # Raise memory limits
# - NEO4J_dbms_memory_pagecache_size=1G
# - NEO4J_dbms.memory.heap.initial_size=1G
# - NEO4J_dbms_memory_heap_max__size=1G
# mongo:
# image: mongo:latest
# container_name: cargoverload-mongo
# restart: unless-stopped
# environment:
# # MONGO_INITDB_ROOT_USERNAME: root
# # MONGO_INITDB_ROOT_PASSWORD: toor
# - MONGODB_DATABASE="cargoverload"
# expose:
# - 27017
# ports:
# - 27017:27017
## REVERSE PROXY
traefik:
image: traefik:v2.3
container_name: cargoverload-traefik
restart: unless-stopped
# Enables the web UI and tells Traefik to listen to docker
command:
- "--api.insecure=true"
- "--providers.docker"
depends_on:
- booking-process
- car-location
- car-tracking
volumes:
# So that Traefik can listen to the Docker events
- /var/run/docker.sock:/var/run/docker.sock
ports:
# The HTTP port
- 80:80
# The Web UI (enabled by --api.insecure=true)
- 8080:8080
## kafka bus configuration
zookeeper:
container_name: zookeeper
restart: unless-stopped
image: wurstmeister/zookeeper
environment:
zk_id: "1"
expose:
- 2181
kafka-service:
container_name: kafka-service
restart: unless-stopped
image: wurstmeister/kafka
depends_on:
- zookeeper
environment:
KAFKA_ADVERTISED_HOST_NAME: kafka-service
KAFKA_ADVERTISED_PORT: 9092
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_BROKER_ID: 1
KAFKA_CREATE_TOPICS: "book-validation:1:1,
book-confirmation:1:1,
book-register:1:1,
book-validation-result:1:1,
car-location-result:1:1,
new-wish:1:1,
new-search:1:1,
raw-wish-result:1:1,
search:1:1,
search-result:1:1,
validation-search:1:1,
validation-search-result:1:1,
wish-requested:1:1,
wish-result:1:1,"
expose:
- 9092
kafka-ui:
image: provectuslabs/kafka-ui
container_name: kafka-ui
ports:
- "9000:8080"
restart: always
environment:
- KAFKA_CLUSTERS_0_NAME=kafka-service
- KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS=kafka-service:9092
- KAFKA_CLUSTERS_0_ZOOKEEPER=zookeeper:2181