-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
325 lines (308 loc) · 9.16 KB
/
docker-compose.yml
File metadata and controls
325 lines (308 loc) · 9.16 KB
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
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
version: '3.9'
services:
rabbitmq:
image: rabbitmq:3.9.13-management-alpine
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 10s
timeout: 10s
mem_limit: 1Gb
cpus: 0.2
ports:
- '5672:5672'
- '15672:15672'
networks:
- development
mssql:
image: mcr.microsoft.com/mssql/server:2019-latest
user: root
environment:
- ACCEPT_EULA=Y
- SA_PASSWORD=Admin@123
volumes:
- mssql-data:/var/opt/mssql/data
healthcheck:
test: /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P ""$$SA_PASSWORD"" -Q "SELECT 1" || exit 1
timeout: 45s
interval: 10s
retries: 10
mem_limit: 1Gb
cpus: 0.2
ports:
- '1433:1433'
networks:
- development
mongo:
image: mongo:5.0.5
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=Admin123
volumes:
- mongo-data:/data/db
mem_limit: 512m
cpus: 0.1
ports:
- '27017:27017'
networks:
- development
redis:
image: redis:6.2.6-bullseye
healthcheck:
test: ['CMD', 'redis-cli', '--raw', 'incr', 'ping']
ports:
- '6379:6379'
mem_limit: 128m
cpus: 0.1
networks:
- development
mailhog:
image: mailhog/mailhog:v1.0.1
mem_limit: 15m
cpus: 0.1
ports:
- 1025:1025
- 8025:8025
networks:
- development
kong:
build: ./kong
environment:
- KONG_DATABASE=off
- KONG_DECLARATIVE_CONFIG=/usr/local/kong/declarative/kong.yml
- KONG_PROXY_ACCESS_LOG=/dev/stdout
- KONG_ADMIN_ACCESS_LOG=/dev/stdout
- KONG_PROXY_ERROR_LOG=/dev/stderr
- KONG_ADMIN_ERROR_LOG=/dev/stderr
- KONG_ADMIN_LISTEN=0.0.0.0:8001, 0.0.0.0:8444 ssl
healthcheck:
test: ['CMD', 'kong', 'health']
interval: 10s
timeout: 10s
retries: 10
mem_limit: 256m
cpus: 0.1
restart: on-failure
ports:
- '8080:8000'
- '8001:8001'
- '8443:8443'
- '8444:8444'
networks:
- development
identity-service:
build: ./identity-service
environment:
- PORT=3000
- GRPC_PORT=4000
- Mongo__ConnectionString=mongodb://root:Admin123@host.docker.internal:27017
- Mongo__DatabaseName=IdentityServiceDb
- Mongo__Collection=UserClaims
- IdentityProvider__Authority={{AUTH0_AUTHORITY}}
- IdentityProvider__Audience={AUTH0_AUDIENCE}
- Redis__Url=host.docker.internal:6379
- AllowedOrigins=http://localhost:3000,http://localhost:3001
- GrpcServices__ConstantsService=http://constant-service:4000
- GrpcServices__StorageService=http://storage-service:4000
- Auth0__Domain={AUTH0_DOMAIN}
- Auth0__ClientId={AUTH0_CLIENTID}
- Auth0__ClientSecret={AUTH0_CLIENT_SECRET}
- Auth0__Audience={AUTH0_AUDIENCE}
- Auth0__GrantType=client_credentials
- RabbitMq__Host=amqp://host.docker.internal:5672
- RabbitMq__Username=guest
- RabbitMq__Password=guest
cpus: 0.1
mem_limit: 64m
restart: on-failure
ports:
- '3010:3000'
- '4000:4000'
networks:
- development
constant-service:
build: ./constant-service
environment:
- PORT=3000
- GRPC_CONNECTION_URL=0.0.0.0:4000
- DATABASE_USER=root
- DATABASE_PASS=Admin123
- DATABASE_URI=mongodb://host.docker.internal:27017
- DATABASE_NAME=ConstantServiceDb
- IDENTITY_PROVIDER_AUTHORITY=https://dev-914wvn2h.us.auth0.com/
- IDENTITY_PROVIDER_AUDIENCE=etutor-api
cpus: 0.1
mem_limit: 64m
restart: on-failure
ports:
- '3011:3000'
- '4001:4000'
networks:
- development
tutor-service:
build: ./tutor-service
environment:
- PORT=3000
- GRPC_PORT=4000
- ConnectionStrings__DefaultConnection=Server=host.docker.internal,1433;Database=TutorServiceDb;User=SA;Password=Admin@123
- GrpcServices__StorageService=http://storage-service:4000
- GrpcServices__CoursesService=http://course-service:4000
- GrpcServices__ConstantsService=http://constant-service:4000
- GrpcServices__IdentitiesService=http://identity-service:4000
- AllowedOrigins=http://localhost:3000,http://localhost:3001
- RabbitMq__Host=amqp://host.docker.internal:5672
- RabbitMq__Username=guest
- RabbitMq__Password=guest
- IdentityProvider__Authority={AUTH0_AUTHORITY}
- IdentityProvider__Audience={AUTH0_AUDIENCE}
cpus: 0.1
mem_limit: 128m
restart: on-failure
ports:
- '3012:3000'
- '4002:4000'
networks:
- development
course-service:
build: ./course-service
environment:
- PORT=3000
- GRPC_PORT=4000
- ConnectionStrings__DefaultConnection=Server=host.docker.internal,1433;Database=CourseServiceDb;User=SA;Password=Admin@123
- AllowedOrigins=http://localhost:3000,http://localhost:3001
- GrpcServices__ConstantsService=http://constant-service:4000
- GrpcServices__StorageService=http://storage-service:4000
- GrpcServices__TutorsService=http://tutor-service:4000
- GrpcServices__EnrollmentsService=http://enrollment-service:4000
- GrpcServices__SessionsService=http://session-service:4000
- RabbitMq__Host=amqp://host.docker.internal:5672
- RabbitMq__Username=guest
- RabbitMq__Password=guest
- IdentityProvider__Authority={AUTH0_AUTHORITY}
- IdentityProvider__Audience={AUTH0_AUDIENCE}
cpus: 0.1
mem_limit: 128m
healthcheck:
test: curl --fail http://host.docker.internal/healthz || exit
interval: 10s
timeout: 10s
restart: on-failure
ports:
- '3013:3000'
- '4003:4000'
networks:
- development
feedback-service:
build: ./feedback-service
environment:
- PORT=3000
- DATABASE_USER=root
- DATABASE_PASS=Admin123
- DATABASE_URI=mongodb://host.docker.internal:27017
- DATABASE_NAME=FeedbackServiceDb
- IDENTITIES_SERVICE=identity-service:4000
cpus: 0.1
mem_limit: 64m
restart: on-failure
ports:
- '3014:3000'
networks:
- development
storage-service:
build: ./storage-service
environment:
- GRPC_CONNECTION_URL=0.0.0.0:4000
- PORT=3000
- DB_HOST=host.docker.internal
- DB_PORT=1433
- DB_USER=sa
- DB_PASSWORD=Admin@123
- DB_NAME=StorageServiceDb
- RABBIT_MQ_URI=amqp://guest:guest@host.docker.internal
- AWS_REGION={AWS_REGION}
- AWS_ACCESS_KEY_ID={AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY={AWS_SECRET_ACCESS_KEY}
- AWS_BUCKET={AWS_BUCKET}
mem_limit: 256m
cpus: 0.1
restart: on-failure
ports:
- '4005:4000'
networks:
- development
enrollment-service:
build: ./enrollment-service
environment:
- PORT=3000
- GRPC_PORT=4000
- ConnectionStrings__DefaultConnection=Server=host.docker.internal,1433;Database=EnrollmentServiceDb;User=SA;Password=Admin@123
- AllowedOrigins=http://localhost:3000,http://localhost:3001
- RabbitMq__Host=amqp://host.docker.internal
- RabbitMq__Username=guest
- RabbitMq__Password=guest
- GrpcServices__CoursesService=http://course-service:4000
- GrpcServices__SessionsService=http://session-service:4000
mem_limit: 64m
cpus: 0.1
restart: on-failure
ports:
- '3016:3000'
- '4006:4000'
networks:
- development
session-service:
build: ./session-service
environment:
- PORT=3000
- GRPC_CONNECTION_URL=0.0.0.0:4000
- ORIGINS=http://localhost:3000
- DATABASE_USER=root
- DATABASE_PASS=Admin123
- DATABASE_URI=mongodb://host.docker.internal:27017
- DATABASE_NAME=SessionServiceDb
- RABBIT_MQ_URI=amqp://guest:guest@host.docker.internal:5672
- COURSES_SERVICE=course-service:4000
mem_limit: 64m
cpus: 0.1
restart: on-failure
ports:
- '3017:3000'
- '4007:4000'
networks:
- development
payment-service:
build: ./payment-service
environment:
- ConnectionStrings__DefaultConnection=Server=host.docker.internal,1433;Database=PaymentServiceDb;User=SA;Password=Admin@123
- AllowedOrigins=http://localhost:3000,http://localhost:3001
- Redis__Url=host.docker.internal:6379
- RabbitMq__Host=amqp://host.docker.internal:5672
- RabbitMq__Username=guest
- RabbitMq__Password=guest
- Paypal__SandboxUrl=https://api-m.sandbox.paypal.com/
- Paypal__Secret={PAYPAL_SECRET}
- Paypal__ClientId={PAYPAL_CLIENTID}
- GrpcServices__CoursesService=http://course-service:4000
- GrpcServices__TutorsService=http://tutor-service:4000
mem_limit: 64m
cpus: 0.1
restart: on-failure
ports:
- '3018:80'
networks:
- development
notification-service:
build: ./notification-service
environment:
- PORT=3000
- DATABASE_URL=mongodb+srv://{MONGO_USER}:{MONGO_PASSWORD}@{MONGO_URL}/NotificationServiceDb
- RABBIT_MQ_URI=amqp://guest:guest@host.docker.internal:5672
- SMTP_URI=smtp://host.docker.internal:1025
cpus: 0.1
restart: on-failure
ports:
- '3019:3000'
networks:
- development
networks:
development:
driver: bridge