This repository has been archived by the owner on Apr 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yaml
416 lines (387 loc) · 11.5 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
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
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
version: "3.8"
services:
#################################
### Archivel Service ###
#################################
# Laravel Service
archivel_1:
&archivel
container_name: archivel_1
build:
context: ./backend/php/laravel
dockerfile: ./.docker/php/Dockerfile
# image: mateonunez/architect-backend-php-laravel:1.2.5
working_dir: /usr/src/architect/backend/php/laravel
volumes:
- /usr/src/architect/backend/laravel/storage
- /usr/src/architect/backend/laravel/vendor
- ./backend/php/laravel:/usr/src/architect/backend/php/laravel
- ./backend/php/laravel/public:/usr/src/architect/backend/php/laravel/public
environment:
# Kong Gateway
KONG_GATEWAY_ENDPOINT: http://kong:8000/
# Database
DB_HOST: architect_mysql
DB_PORT: 3306
DB_DATABASE: architect_mysql
DB_USERNAME: architect
DB_PASSWORD: architect
# Broker
RABBITMQ_HOST: architect_rabbitmq
RABBITMQ_PORT: 5672
RABBITMQ_USER: architect
RABBITMQ_PASS: architect
depends_on:
- architect_mysql
- architect_rabbitmq
networks:
- architect_network
archivel_2:
<<: *archivel
# image: mateonunez/architect-backend-php-laravel:1.2.5
container_name: archivel_2
# MySQL Service
architect_mysql:
container_name: architect_mysql
image: mysql:8.0.33
platform: linux/x86_64
restart: always
volumes:
- ./backend/php/laravel/.docker/database/mysql/architect:/var/lib/mysql
expose:
- 3306
environment:
MYSQL_DATABASE: architect_mysql
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: architect
MYSQL_PASSWORD: architect
networks:
- architect_network
# MySQL Testing Service
architect_mysql_testing:
container_name: architect_mysql_testing
image: mysql:8.0.33
platform: linux/x86_64
restart: always
volumes:
- ./backend/php/laravel/.docker/database/mysql/architect_testing:/var/lib/mysql
ports:
- 3370:3306
environment:
MYSQL_DATABASE: architect_mysql_testing
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: architect
MYSQL_PASSWORD: architect
networks:
- architect_network
# Nginx Laravel Service
archivel_nginx:
container_name: archivel_nginx
build:
context: ./nginx/archivel
dockerfile: ./Dockerfile
# image: mateonunez/architect-nginx-laravel:1.2.1
ports:
- 8000:80
volumes:
- ./backend/php/laravel/public:/usr/src/architect/backend/php/laravel/public
environment:
# Laravel
ARCHIVEL_HOST: archivel_1
ARCHIVEL_PORT: 9000
# Laravel 2
ARCHIVEL_HOST_2: archivel_2
ARCHIVEL_PORT_2: 9000
# Nginx
NGINX_PORT: 80
NGINX_ROOT: /usr/src/architect/backend/php/laravel/public
depends_on:
- archivel_1
- archivel_2
networks:
- architect_network
#################################
### Archifront Service ###
#################################
# Homepage
archifront_homepage:
container_name: archifront_homepage
platform: linux/x86_64
build:
context: ./frontend/archifront/homepage
dockerfile: ./.docker/Dockerfile
# image: mateonunez/architect-frontend-archifront-homepage:1.1.4
working_dir: /usr/src/architect/frontend/archifront/homepage
restart: always
expose:
- 3000
volumes:
- /usr/src/architect/frontend/archifront/homepage/node_modules
- ./frontend/archifront/homepage:/usr/src/architect/frontend/archifront/homepage
environment:
HOST: archifront_nginx
KONG_GATEWAY_ENDPOINT: http://kong:8000
ARCHIFRONT_ENDPOINT: http://archifront_nginx
# env_file:
# - ./frontend/archifront/homepage/.env.local
networks:
- architect_network
# User Authentication
archifront_authentication:
container_name: archifront_authentication
platform: linux/x86_64
build:
context: ./frontend/archifront/authentication
dockerfile: ./.docker/Dockerfile
# image: mateonunez/architect-frontend-archifront-authentication:1.1.16
working_dir: /usr/src/architect/frontend/archifront/authentication
restart: on-failure
volumes:
- /usr/src/architect/frontend/archifront/authentication/node_modules
- ./frontend/archifront/authentication:/usr/src/architect/frontend/archifront/authentication
environment:
HOST: archifront_nginx
KONG_GATEWAY_ENDPOINT: http://kong:8000
ARCHIFRONT_ENDPOINT: http://archifront_nginx
expose:
- 3000
depends_on:
- archivel_nginx
networks:
- architect_network
# Nginx Architect Frontend Service
archifront_nginx:
container_name: archifront_nginx
build:
context: ./nginx/archifront
dockerfile: ./Dockerfile
# image: mateonunez/architect-nginx-archifront:1.2
environment:
- NGINX_HOST=archifront_nginx
- ARCHIFRONT_AUTHENTICATION_HOST=archifront_authentication
- ARCHIFRONT_HOMEPAGE_HOST=archifront_homepage
ports:
- 80:80
depends_on:
- archifront_homepage
- archifront_authentication
networks:
- architect_network
#################################
### Balancer Service ###
#################################
# Balancer service Rust
balancer_rust:
container_name: balancer_rust
restart: on-failure
build:
context: ./backend/rust/balancer
dockerfile: ./.docker/Dockerfile
# image: mateonunez/architect-backend-rust-balancer:1.0
working_dir: /usr/src/architect/backend/rust/balancer
expose:
- 5500
volumes:
- /usr/src/architect/backend/rust/balancer/target
- ./backend/rust/balancer:/usr/src/architect/backend/rust/balancer
environment:
BALANCER_HOST: balancer_rust
BALANCER_PORT: 5500
networks:
- architect_network
# Balancer service Javascript
balancer_javascript:
container_name: balancer_javascript
build:
context: ./backend/javascript/balancer
dockerfile: ./.docker/Dockerfile
# image: mateonunez/architect-backend-javascript-balancer:1.0
working_dir: /usr/src/architect/backend/javascript/balancer
expose:
- 5010
volumes:
- /usr/src/architect/backend/javascript/balancer/node_modules
- ./backend/javascript/balancer:/usr/src/architect/backend/javascript/balancer
environment:
BALANCER_HOST: balancer_javascript
BALANCER_PORT: 5010
networks:
- architect_network
# Nginx Balancer Service
balancer_nginx:
container_name: balancer_nginx
build:
context: ./nginx/balancer
dockerfile: ./Dockerfile
# image: mateonunez/architect-nginx-balancer:1.0
environment:
# Nginx
NGINX_PORT: 80
NGINX_HOST: balancer_nginx
# Balancer
BALANCER_RUST_HOST: balancer_rust
BALANCER_RUST_PORT: 5500
# Another Balancer
BALANCER_JAVASCRIPT_HOST: balancer_javascript
BALANCER_JAVASCRIPT_PORT: 5010
ports:
- 8080:80
depends_on:
- balancer_javascript
- balancer_rust
networks:
- architect_network
#################################
### Mailman Service ###
#################################
mailman:
container_name: mailman
restart: on-failure
build:
context: ./backend/typescript/mailman
dockerfile: ./.docker/Dockerfile
# image: mateonunez/architect-backend-typescript-mailman:1.0
working_dir: /usr/src/architect/backend/typescript/mailman
volumes:
- /usr/src/architect/backend/typescript/mailman/node_modules
- ./backend/typescript/mailman:/usr/src/architect/backend/typescript/mailman
ports:
- 5555:5555
# environment:
# MAILGUN_DOMAIN: architect_mailgun_domain
# MAILGUN_API_URL: architect_mailgun_api_url
# MAILGUN_API_USER: architect_mailgun_api_user
# MAILGUN_API_KEY: architect_mailgun_api_key # Remove this as soon as possible
env_file:
- ./backend/typescript/mailman/.env
networks:
- architect_network
#################################
### Watchful Service ###
#################################
# Watchful service
watchful:
container_name: watchful
restart: on-failure
platform: linux/x86_64
build:
context: ./backend/typescript/watchful
dockerfile: ./.docker/Dockerfile
# image: mateonunez/architect-backend-javascript-watchful:1.0
working_dir: /usr/src/architect/backend/typescript/watchful
volumes:
- /usr/src/architect/backend/typescript/watchful/node_modules
- ./backend/typescript/watchful:/usr/src/architect/backend/typescript/watchful
environment:
RABBITMQ_HOST: architect_rabbitmq
RABBITMQ_PORT: 5672
RABBITMQ_USER: architect
RABBITMQ_PASS: architect
depends_on:
- architect_rabbitmq
networks:
- architect_network
# RabbitMQ Service
architect_rabbitmq:
container_name: architect_rabbitmq
image: rabbitmq:3.11.13-management
restart: on-failure
environment:
RABBITMQ_DEFAULT_USER: architect
RABBITMQ_DEFAULT_PASS: architect
expose:
# AMQP protocol port
- 5672
ports:
# UI Management port
- 15672:15672
networks:
- architect_network
#################################
### Kong Gateway Service ###
#################################
# Kong API Gateway Service
kong:
container_name: kong
image: kong:latest
environment:
KONG_DATABASE: postgres
KONG_PG_HOST: kong_postgres
KONG_PG_DATABASE: kong_database
KONG_PG_USER: architect
KONG_PG_PASSWORD: architect
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_PROXY_LISTEN: kong:8000
KONG_ADMIN_LISTEN: kong:8001
ports:
- 8033:8000 # Kong API Gateway port
- 8433:8443 # Kong SSL API Gateway port
- 8034:8001 # Kong Admin port
- 8444:8444 # Kong SSL Admin port
depends_on:
- kong_migrations
- kong_postgres
networks:
- architect_network
# PostgresDB Service for Kong
kong_postgres:
container_name: kong_postgres
image: postgres:15.2
environment:
POSTGRES_DB: kong_database
POSTGRES_USER: architect
POSTGRES_PASSWORD: architect
restart: on-failure
stdin_open: true
tty: true
expose:
- 5432
volumes:
- ./kong/postgres/data:/var/lib/postgresql/data
- ./kong/postgres/init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- architect_network
# Konga Dashboard Service
konga:
container_name: konga
image: pantsel/konga
environment:
TOKEN_SECRET: architect-konga-token-secret
DB_ADAPTER: postgres
DB_HOST: kong_postgres
DB_PORT: 5432
DB_DATABASE: kong_database
DB_USER: architect
DB_PASSWORD: architect
NODE_ENV: development
KONGA_HOOK_TIMEOUT: 10000
restart: on-failure
ports:
- 8037:1337
depends_on:
- kong_postgres
networks:
- architect_network
# Kong Migrations
kong_migrations:
container_name: kong_migrations
image: kong:latest
command: kong migrations bootstrap
environment:
KONG_DATABASE: postgres
KONG_PG_HOST: kong_postgres
KONG_PG_DATABASE: kong_database
KONG_PG_USER: architect
KONG_PG_PASSWORD: architect
KONG_PG_PORT: 5432
KONG_PG_SCHEMA: public
restart: on-failure
networks:
- architect_network
# Docker Network
networks:
architect_network:
driver: bridge