-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
188 lines (172 loc) · 4.3 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
version: '3.1'
services:
### User Management API
mongo_db_users:
image: mongo:7.0.6
volumes:
- mongo_data_users:/data/mongo
restart: unless-stopped
networks:
- native
user-management-api:
container_name: user-management-api
build:
context: UserManagementAPI
dockerfile: Dockerfile
restart: always
environment:
MONGO_DB_URI: mongodb://mongo_db_users:27017/users_db
expose:
- 8080
depends_on:
- mongo_db_users
networks:
- native
### Restaurant Management API
mongo_db_restaurants:
image: mongo:7.0.6
volumes:
- mongo_data_restaurants:/data/mongo
restart: unless-stopped
networks:
- native
restaurant-management-api:
container_name: restaurant-management-api
build:
context: RestaurantManagementAPI
dockerfile: ./src/main/docker/Dockerfile.jvm
restart: always
environment:
MONGO_DB_URI: mongodb://mongo_db_restaurants:27017/restaurant_db
expose:
- 8080
depends_on:
- mongo_db_restaurants
networks:
- native
### Order Processing API
mongo_db_orders:
image: mongo:7.0.6
volumes:
- mongo_data_orders:/data/mongo
restart: unless-stopped
networks:
- native
order-processing-grpc-api:
container_name: order-processing-grpc-api
build:
context: OrderProcessingAPI
dockerfile: ./src/main/docker/Dockerfile.jvm
restart: always
environment:
MONGO_DB_URI: mongodb://mongo_db_orders:27017/orders_db
RABBITMQ_HOST: rabbitmq_container
expose:
- 8080
- 9000
depends_on:
- mongo_db_orders
networks:
- native
### API Gateway for Web
web-api-gateway:
build:
context: API_GatewayWeb
dockerfile: Dockerfile
restart: always
environment:
JWT_SECRET: A9BBD31CB41A4629875353E3A1AA9
USERS_API: http://user-management-api:8080/api/v1
RESTAURANTS_API: http://restaurant-management-api:8080
ORDERS_GRPC_API: order-processing-grpc-api:9000
expose:
- 8080
ports:
- "8080:8080"
networks:
- native
### API Gateway for Mobile
mobile-api-gateway:
build:
context: API_GatewayMobile
dockerfile: Dockerfile
restart: always
environment:
USERS_API: http://user-management-api:8080/api/v1
RESTAURANTS_API: http://restaurant-management-api:8080
ORDERS_GRPC_API: order-processing-grpc-api:9000
expose:
- 8080
ports:
- "8081:8080"
networks:
- native
### Exception Logging API
mongo_db_exceptions:
image: mongo:7.0.6
volumes:
- mongo_data_exceptions:/data/mongo
restart: unless-stopped
networks:
- native
exception-logging-api:
build:
context: ExceptionLoggingAPI
dockerfile: Dockerfile
restart: always
depends_on:
- mongo_db_exceptions
expose:
- 8080
ports:
- "8082:8080"
networks:
- native
# Orders Microfrontend
orders-web-app:
depends_on:
- web-api-gateway
build:
context: ./WEB_Microfrontends/orders
dockerfile: Dockerfile
environment:
API_TOKEN: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY2MWZlYjU2YjI2ZTEwYjRjMDkzNzZjNiIsImV4cCI6NjQ0OTQ3MDg3OH0.fOWJzwFCdb6pWJkr8wJUxW1bvZ2PWsrU4qjanFq6tpU
ports:
- "3001:3001"
networks:
- native
# Basket Microfrontend
basket-web-app:
depends_on:
- orders-web-app
build:
context: ./WEB_Microfrontends/basket
dockerfile: Dockerfile
environment:
API_TOKEN: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY2MWZlYjU2YjI2ZTEwYjRjMDkzNzZjNiIsImV4cCI6NjQ0OTQ3MDg3OH0.fOWJzwFCdb6pWJkr8wJUxW1bvZ2PWsrU4qjanFq6tpU
ports:
- "3002:3002"
networks:
- native
# Home Microfrontend
home-web-app:
depends_on:
- basket-web-app
build:
context: ./WEB_Microfrontends/home
dockerfile: Dockerfile
environment:
API_TOKEN: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY2MWZlYjU2YjI2ZTEwYjRjMDkzNzZjNiIsImV4cCI6NjQ0OTQ3MDg3OH0.fOWJzwFCdb6pWJkr8wJUxW1bvZ2PWsrU4qjanFq6tpU
ports:
- "3000:3000"
networks:
- native
networks:
native:
name: native-network
driver: bridge
volumes:
mongo_data_users:
mongo_data_restaurants:
mongo_data_orders:
mongo_data_exceptions: