-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
240 lines (210 loc) · 5.85 KB
/
docker-compose.yaml
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
volumes:
rabbitmq_data:
services:
##################################
#? kong: API Gateway
##################################
kong:
build:
context: ./api_gateway
dockerfile: Dockerfile
image: kong:latest
container_name: kong
restart: always
environment:
KONG_DATABASE: "off"
KONG_DECLARATIVE_CONFIG: kong.yml
ports:
- "8000:8000"
- "8443:8443"
- "8001:8001"
depends_on:
- process_booking
- kafka
##################################
#? class_db: The Class database
##################################
class_db:
image: mongo:latest
ports:
- "27017:27017"
##################################
#? class_service: The Class microservice
##################################
class_service:
build: ./class_service/
container_name: class_service
ports:
- "5006:5006"
environment:
DB_ENVIRONMENT: class_db
port: "5006"
depends_on:
- class_db
#################################
#? review_db: The Class database
#################################
review_db:
image: mongo:latest
command: mongod --port 27021
ports:
- "27021:27021"
#################################
#? review_service: The Class microservice
#################################
review_service:
build: ./review_service/
container_name: review_service
depends_on:
- review_db
ports:
- "5004:5004"
environment:
DB_ENVIRONMENT: review_db
##################################
#? user_db: The User database
##################################
user_db:
image: mongo:latest
command: mongod --port 27018
ports:
- "27018:27018"
##################################
#? user_service: The User microservice
##################################
user_service:
build: ./user_service/
container_name: user_service
ports:
- "5001:5001"
depends_on:
- user_db
environment:
DB_ENVIRONMENT: user_db
##################################
#? get_class_complex_service: The user class information microservice
##################################
get_class_complex_service:
build: ./get_class_complex_service/
container_name: get_class_complex_service
ports:
- "5005:5005"
environment:
class_service_URL: http://class_service:5006
user_service_URL: http://user_service:5001
##################################
#? message_db: The Message database
##################################
message_db:
image: mongo:latest
command: mongod --port 27019
ports:
- "27019-27019"
##################################
#? messaging service: The messaging microservice
##################################
message_service:
build: ./message_service/
container_name: message_service
restart: always
ports:
- "5010:5010"
depends_on:
- rabbitmq
environment:
PORT: "5010"
rabbitMQ: "amqp://rabbitmq:5672"
queueName: "email_service"
dbUri: "mongodb://message_db:27019/messaging"
##################################
#? payment_service: The payment microservice
##################################
payment_service:
platform: linux/amd64
build: ./payment_service/
container_name: payment_service
ports:
- 8080:8080
##################################
#? stripe-cli: Stripe CLI
##################################
stripe-cli:
image: stripe/stripe-cli
network_mode: host
container_name: stripe-cli
command: "listen --api-key sk_test_51MkznJJTqG9NvRuTocMwazTMTEeBy768PQxBvO4Srz98L9TVFOmQu09Q5HXpmuJuPHedPsgfVEQLX3RDMyEtveqE007p8h6WmP --device-name bookingApp --forward-to host.docker.internal:8080/stripe/events"
env_file:
- stripe_cli.env
##################################
#? process_booking: The booking microservice
##################################
process_booking:
platform: linux/amd64
build: ./process_booking_service/
container_name: process_booking
restart: always
ports:
- 5008:5008
environment:
get_classes_base_URL: http://get_class_complex_service:5005
# class_service_URL: http://class_service:5006
# user_service_URL: http://user_service:5001
payment_service_URL: http://host.docker.internal:8080/create-payment-intent
rabbit_host: rabbitmq
rabbit_port: 5672
depends_on:
- user_service
- class_service
##################################
#? rabbitmq: The rabbitmq broker
##################################
rabbitmq:
image: rabbitmq
hostname: rabbitmq
container_name: rabbitmq
restart: always
ports:
- "5672:5672"
- "15672:15672"
volumes:
- rabbitmq_data:/var/lib/rabbitmq
##################################
#? kafka: The kafka broker w zookeeper
##################################
zookeeper:
image: "bitnami/zookeeper:latest"
restart: always
ports:
- "2181:2181"
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
kafka:
image: "bitnami/kafka:latest"
restart: always
ports:
- "9092:9092"
- "29092:29092"
environment:
- KAFKA_BROKER_ID=1
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CLIENT:PLAINTEXT,EXTERNAL:PLAINTEXT
- KAFKA_CFG_LISTENERS=CLIENT://:9092,EXTERNAL://:29092
- KAFKA_CFG_ADVERTISED_LISTENERS=CLIENT://kafka:9092,EXTERNAL://localhost:29092
- KAFKA_CFG_INTER_BROKER_LISTENER_NAME=CLIENT
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
depends_on:
- zookeeper
recommendation_service:
build: ./recommendation_service/
container_name: recommendation_service
restart: always
depends_on:
- kafka
consumer_service:
build: ./consumer_service/
container_name: consumer_service
restart: always
depends_on:
- kafka
ports:
- "5011:5011"