-
Notifications
You must be signed in to change notification settings - Fork 39
/
docker-compose.M1.yaml
315 lines (296 loc) · 8.44 KB
/
docker-compose.M1.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
version: "3"
include:
- ./services/permits/docker-compose.yaml
services:
####################### Keycloak for Cypress #######################
keycloak:
build:
context: ./cypress/.docker/keycloak
dockerfile: Dockerfile.test
container_name: cypress-keycloak
environment:
DB_VENDOR: h2
DB_DATABASE: keycloak
DB_USER: keycloak
DB_PASSWORD: keycloak
KEYCLOAK_IMPORT: /tmp/realm-export.json -Dkeycloak.profile.feature.upload_scripts=enabled
volumes:
- ./cypress/realm-export.json:/tmp/realm-export.json
- ./cypress/keycloak-users.json:/opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json
ports:
- 8080:8080
####################### Open Telemetry #######################
otelcollector:
image: otel/opentelemetry-collector
command: [ --config=/etc/otel-collector-config.yaml ]
volumes:
- ./otel-collector-config.yaml:/etc/otel-collector-config.yaml
ports:
- 1888:1888 # pprof extension
- 8888:8888 # Prometheus metrics exposed by the collector
- 8889:8889 # Prometheus exporter metrics
- 13133:13133 # health_check extension
- 4317:4317 # OTLP gRPC receiver
- 4318:4318 # OTLP http receiver
- 55679:55679 # zpages extension
####################### Jaeger Tracing #######################
jaeger:
image: "jaegertracing/all-in-one:latest"
container_name: mds_jaeger
environment:
- COLLECTOR_OTLP_ENABLED=true
# Port Details: https://www.jaegertracing.io/docs/1.43/getting-started/#all-in-one
# Ports : https://www.jaegertracing.io/docs/1.43/monitoring/#metrics
ports:
- 16686:16686
- 14250:14250
####################### Postgres Definition #######################
postgres:
restart: always
container_name: mds_postgres
user: postgres
build:
context: services/postgres
dockerfile: Dockerfile
environment:
- POSTGRES_USER=mds
- POSTGRES_PASSWORD=test
- POSTGRES_DB=mds
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: [ "CMD", "pg_isready" ]
interval: 5s
timeout: 5s
retries: 5
####################### Flyway Migration Definition #######################
flyway:
container_name: mds_flyway
build:
context: migrations
dockerfile: Dockerfile.flyway.M1.dev
environment:
- FLYWAY_USER=mds
- FLYWAY_HOME=/flyway
- FLYWAY_PASSWORD=test
- FLYWAY_DB_NAME=mds
- FLYWAY_DB_HOST=postgres
- FLYWAY_URL=jdbc:postgresql://postgres/mds
- FLYWAY_OUT_OF_ORDER=true
- FLYWAY_CONNECT_RETRIES=60
- NRIS_USER_PASSWORD=nris_pass
- DOCMAN_USER_PASSWORD=docman_pass
- LOGSTASH_USER_PASSWORD=logstash_pass
- METABASE_USER_PASSWORD=metabase_pass
- PLATFORM=LOCAL
volumes:
- ./migrations/sql:/flyway/sql
- ./migrations/sql-prod:/flyway/sql-prod
- ./migrations/scripts:/flyway/scripts
depends_on:
- postgres
####################### Backend Definition #######################
backend:
restart: always
user: 1000:1000
container_name: mds_backend
build:
context: services/core-api
env_file: services/core-api/.env
ports:
- 5000:5000
volumes:
- ./migrations:/migrations
- ./services/core-api:/app
- core_api_logs:/var/log/core-api
depends_on:
- flyway
- nris_backend
- document_manager_backend
- tusd
- filesystem_provider
- postgres
- redis
- jaeger
- otelcollector
- keycloak
healthcheck:
test: [ "CMD", "curl", "localhost:5000/health" ]
interval: 5s
timeout: 5s
retries: 5
####################### Redis Definition #######################
redis:
image: redis:3.2-alpine
container_name: mds_cache
restart: always
command: redis-server --requirepass redis-password
ports:
- "6379:6379"
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 5s
timeout: 5s
retries: 5
####################### Frontend Definition #######################
frontend:
restart: always
user: 1000:1000
container_name: mds_frontend
platform: linux/amd64
build:
context: services/core-web
command: [ "npm", "run", "serve" ]
volumes:
- ./services/core-web/src:/app/src
ports:
- 3000:3000
depends_on:
- backend
env_file: ./services/core-web/.env
healthcheck:
test: [ "CMD", "curl", "localhost:3000/health" ]
interval: 15s
timeout: 5s
retries: 5
start_period: 30s
####################### Minespace Definition #######################
minespace:
restart: always
user: 1000:1000
container_name: mds_minespace
platform: linux/amd64
build:
context: services/minespace-web
command: [ "npm", "run", "serve" ]
volumes:
- ./services/minespace-web/src:/app/src
ports:
- 3020:3020
depends_on:
- backend
env_file: ./services/minespace-web/.env
healthcheck:
test: [ "CMD", "curl", "localhost:3020/health" ]
interval: 5s
timeout: 5s
retries: 5
####################### NRIS_BACKEND Definition #######################
nris_backend:
restart: always
container_name: nris_python
build:
context: services/nris-api/backend
ports:
- 5500:5500
volumes:
- ./services/nris-api/backend:/app
depends_on:
- flyway
- redis
- nris_migrate
env_file: ./services/nris-api/backend/.env
healthcheck:
test: [ "CMD", "curl", "localhost:5500/health" ]
interval: 5s
timeout: 5s
retries: 5
nris_migrate:
restart: on-failure
container_name: nris_migrate
build:
dockerfile: Dockerfile.migrate
context: services/nris-api/backend
volumes:
- ./services/nris-api/backend:/app
depends_on:
- flyway
- redis
env_file: ./services/nris-api/backend/.env
####################### TUSD Definition #######################
tusd:
container_name: tusd
build:
context: services/tusd
expose:
- 1080
env_file: ./services/tusd/.env
####################### Syncfusion Filesystem Provider Definition #######################
filesystem_provider:
container_name: filesystem_provider
build:
context: services/filesystem-provider
ports:
- 62870:62870
env_file: ./services/filesystem-provider/.env
####################### DOCUMENT_MANAGER_BACKEND Definition #######################
document_manager_backend:
restart: always
container_name: document_manager_backend
build:
context: services/document-manager/backend
ports:
- 5001:5001
volumes:
- ./services/document-manager/backend:/app
- document_manager_logs:/var/log/document-manager
depends_on:
- postgres
- redis
- document_manager_migrate
- document_manager_celery
- tusd
env_file: ./services/document-manager/backend/.env
document_manager_celery:
restart: always
container_name: document_manager_celery
build:
context: services/document-manager/backend
entrypoint: ./celery.sh
ports:
- 5555:5555
volumes:
- ./services/document-manager/backend:/app
- document_manager_logs:/var/log/document-manager
depends_on:
- postgres
- redis
- tusd
env_file: ./services/document-manager/backend/.env
document_manager_migrate:
restart: on-failure
container_name: document_manager_migrate
build:
dockerfile: Dockerfile.migrate
context: services/document-manager/backend
volumes:
- ./services/document-manager/backend:/app
depends_on:
- postgres
- redis
env_file: ./services/document-manager/backend/.env
####################### DOCUMENT_GENERATION Definition #######################
docgen-api:
restart: always
container_name: docgen_api
image: bcgovimages/common-document-generation-service:2.4.1
command: [ "npm", "run", "start" ]
environment:
- SERVER_PORT=3030
- APP_PORT=3030
- CACHE_DIR=/tmp/tmp-reports
- NODE_ENV=development
ports:
- 3030:3030
####################### Networks Definition ######################
networks:
default:
driver: "bridge"
####################### Volumes Definition #######################
volumes:
postgres_data: {}
core_api_logs: {}
core_web_logs: {}
document_manager_logs: {}