generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
287 lines (282 loc) · 10.4 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
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
services:
sftp:
container_name: sftp
image: atmoz/sftp
volumes:
- ${LOCAL_SHARE_FOLDER}:${SFTP_SHARE_FOLDER}
- ${LOCAL_PUBLIC_KEY_LOCATION}:${SFTP_PUBLIC_KEY_LOCATION}
ports:
- "22:22"
command: ${CFS_SFTP_USERNAME}::1001
sql-server-db:
container_name: sql-server-db
build:
context: ./database/mssql
dockerfile: Dockerfile
environment:
MSSQL_HOST: sql-server-db
MSSQL_PORT: ${MSSQL_PORT}
MSSQL_DB: ${MSSQL_DB}
MSSQL_SA_USER: ${MSSQL_SA_USER}
# Ensure there are no dollar sign ($) characters in the password.
# Due to the nature of the docker-mssql and how we are loading the
# schema with bash and variable substitution any passwords with
# $ will not work and the database will not start.
MSSQL_SA_PASSWORD: ${MSSQL_SA_PASSWORD}
MSSQL_ENCRYPT: ${MSSQL_ENCRYPT}
MSSQL_RUN_TESTS: ${MSSQL_RUN_TESTS}
SAMPLE_PENDING_IDIR_USERS: ${SAMPLE_PENDING_IDIR_USERS}
PAYBC_GL_CODE: ${PAYBC_GL_CODE}
GL_PROJ_CODE: ${GL_PROJ_CODE}
MSSQL_LOAD_SAMPLE_DATA: ${MSSQL_LOAD_SAMPLE_DATA}
MSSQL_MOTI_HOST: ${MSSQL_MOTI_HOST}
MSSQL_MOTI_DB: ${MSSQL_MOTI_DB}
MSSQL_MOTI_USER: ${MSSQL_MOTI_USER}
# See note about dollar signs in passwords, above.
MSSQL_MOTI_PASSWORD: ${MSSQL_MOTI_PASSWORD}
SCRIPT_DIR: /usr/config
healthcheck:
test: /opt/mssql-tools/bin/sqlcmd -S $$MSSQL_HOST -U $$MSSQL_SA_USER -P $$MSSQL_SA_PASSWORD -Q "USE $$MSSQL_DB" | grep "Changed database context to '$$MSSQL_DB'"
interval: 20s
timeout: 10s
retries: 3
start_period: 10s
hostname: sql-server-db
ports:
- "1433:1433"
volumes:
- /sql_data
vehicles-api:
container_name: vehicles-api
build:
context: ./vehicles/
dockerfile: Dockerfile
environment:
NODE_ENV: development
VEHICLES_API_LOG_LEVEL: ${VEHICLES_API_LOG_LEVEL}
VEHICLES_API_TYPEORM_LOG_LEVEL: ${VEHICLES_API_TYPEORM_LOG_LEVEL}
VEHICLES_API_MAX_QUERY_EXECUTION_TIME_MS: ${VEHICLES_API_MAX_QUERY_EXECUTION_TIME_MS}
VEHICLES_API_MSSQL_MAX_CONNECTION: ${VEHICLES_API_MSSQL_MAX_CONNECTION}
DB_TYPE: ${DB_TYPE}
MSSQL_HOST: sql-server-db
MSSQL_PORT: ${MSSQL_PORT}
MSSQL_DB: ${MSSQL_DB}
MSSQL_SA_USER: ${MSSQL_SA_USER}
MSSQL_SA_PASSWORD: ${MSSQL_SA_PASSWORD}
MSSQL_ENCRYPT: ${MSSQL_ENCRYPT}
KEYCLOAK_ISSUER_URL: ${KEYCLOAK_ISSUER_URL}
KEYCLOAK_AUDIENCE: ${KEYCLOAK_AUDIENCE}
KEYCLOAK_IGNORE_EXP: ${KEYCLOAK_IGNORE_EXP}
ACCESS_API_URL: "http://vehicles-api:5000"
DOPS_URL: "http://dops-api:5001"
FRONTEND_URL: "http://frontend:3000"
PAYBC_API_KEY: ${PAYBC_API_KEY}
PAYBC_REF_NUMBER: ${PAYBC_REF_NUMBER}
PAYBC_BASE_URL: ${PAYBC_BASE_URL}
PAYBC_REDIRECT: ${PAYBC_REDIRECT}
GL_CODE: ${GL_CODE}
ORBC_SERVICE_ACCOUNT_CLIENT_ID: ${ORBC_SERVICE_ACCOUNT_CLIENT_ID}
ORBC_SERVICE_ACCOUNT_CLIENT_SECRET: ${ORBC_SERVICE_ACCOUNT_CLIENT_SECRET}
ORBC_SERVICE_ACCOUNT_AUDIENCE: ${ORBC_SERVICE_ACCOUNT_AUDIENCE}
BCGOV_FAX_EMAIL: ${BCGOV_FAX_EMAIL}
CFS_CREDIT_ACCOUNT_URL: ${CFS_CREDIT_ACCOUNT_URL}
CFS_CREDIT_ACCOUNT_CLIENT_ID: ${CFS_CREDIT_ACCOUNT_CLIENT_ID}
CFS_CREDIT_ACCOUNT_CLIENT_SECRET: ${CFS_CREDIT_ACCOUNT_CLIENT_SECRET}
healthcheck:
test: "curl --silent --fail http://localhost:5000/ > /dev/null || exit 1"
interval: 1m30s
timeout: 10s
retries: 3
start_period: 40s
depends_on:
sql-server-db:
condition: service_healthy
policy-api:
condition: service_healthy
hostname: vehicles-api
links:
- sql-server-db
- dops-api
- policy-api
ports:
- "5000:5000"
dops-api:
container_name: dops-api
build:
context: ./dops/
dockerfile: Dockerfile
environment:
NODE_ENV: development
DOPS_API_LOG_LEVEL: ${DOPS_API_LOG_LEVEL}
DOPS_API_TYPEORM_LOG_LEVEL: ${DOPS_API_TYPEORM_LOG_LEVEL}
DOPS_API_MAX_QUERY_EXECUTION_TIME_MS: ${DOPS_API_MAX_QUERY_EXECUTION_TIME_MS}
DOPS_API_MSSQL_MAX_CONNECTION: ${DOPS_API_MSSQL_MAX_CONNECTION}
DB_TYPE: ${DB_TYPE}
MSSQL_HOST: sql-server-db
MSSQL_PORT: ${MSSQL_PORT}
MSSQL_DB: ${MSSQL_DB}
MSSQL_SA_USER: ${MSSQL_SA_USER}
MSSQL_SA_PASSWORD: ${MSSQL_SA_PASSWORD}
MSSQL_ENCRYPT: ${MSSQL_ENCRYPT}
KEYCLOAK_ISSUER_URL: ${KEYCLOAK_ISSUER_URL}
KEYCLOAK_AUDIENCE: ${KEYCLOAK_AUDIENCE}
KEYCLOAK_IGNORE_EXP: ${KEYCLOAK_IGNORE_EXP}
DOPS_CVSE_FORMS_CACHE_TTL_MS: ${DOPS_CVSE_FORMS_CACHE_TTL_MS}
OCIO_S3_ACCESSKEYID: ${OCIO_S3_ACCESSKEYID}
OCIO_S3_BUCKET: ${OCIO_S3_BUCKET}
OCIO_S3_PRESIGNED_URL_EXPIRY: ${OCIO_S3_PRESIGNED_URL_EXPIRY}
OCIO_S3_ENDPOINT: ${OCIO_S3_ENDPOINT}
OCIO_S3_KEY: ${OCIO_S3_KEY}
OCIO_S3_SECRETACCESSKEY: ${OCIO_S3_SECRETACCESSKEY}
CHES_TOKEN_URL: ${CHES_TOKEN_URL}
CHES_CLIENT_ID: ${CHES_CLIENT_ID}
CHES_CLIENT_SECRET: ${CHES_CLIENT_SECRET}
CHES_URL: ${CHES_URL}
CDOGS_TOKEN_URL: ${CDOGS_TOKEN_URL}
CDOGS_CLIENT_ID: ${CDOGS_CLIENT_ID}
CDOGS_CLIENT_SECRET: ${CDOGS_CLIENT_SECRET}
CDOGS_URL: ${CDOGS_URL}
ACCESS_API_URL: "http://vehicles-api:5000"
DOPS_URL: "http://dops-api:5001"
FRONTEND_URL: "http://frontend:3000"
ORBC_SERVICE_ACCOUNT_CLIENT_ID: ${ORBC_SERVICE_ACCOUNT_CLIENT_ID}
ORBC_SERVICE_ACCOUNT_CLIENT_SECRET: ${ORBC_SERVICE_ACCOUNT_CLIENT_SECRET}
ORBC_SERVICE_ACCOUNT_AUDIENCE: ${ORBC_SERVICE_ACCOUNT_AUDIENCE}
healthcheck:
test: "curl --silent --fail http://localhost:5001/ > /dev/null || exit 1"
interval: 1m30s
timeout: 10s
retries: 3
start_period: 40s
depends_on:
sql-server-db:
condition: service_healthy
hostname: dops-api
links:
- sql-server-db
ports:
- "5001:5001"
policy-api:
container_name: policy-api
build:
context: ./policy/
dockerfile: Dockerfile
environment:
NODE_ENV: development
POLICY_API_LOG_LEVEL: ${POLICY_API_LOG_LEVEL}
POLICY_API_TYPEORM_LOG_LEVEL: ${POLICY_API_TYPEORM_LOG_LEVEL}
POLICY_API_MAX_QUERY_EXECUTION_TIME_MS: ${POLICY_API_MAX_QUERY_EXECUTION_TIME_MS}
POLICY_API_MSSQL_MAX_CONNECTION: ${POLICY_API_MSSQL_MAX_CONNECTION}
DB_TYPE: ${DB_TYPE}
MSSQL_HOST: sql-server-db
MSSQL_PORT: ${MSSQL_PORT}
MSSQL_DB: ${MSSQL_DB}
MSSQL_SA_USER: ${MSSQL_SA_USER}
MSSQL_SA_PASSWORD: ${MSSQL_SA_PASSWORD}
MSSQL_ENCRYPT: ${MSSQL_ENCRYPT}
KEYCLOAK_ISSUER_URL: ${KEYCLOAK_ISSUER_URL}
KEYCLOAK_AUDIENCE: ${KEYCLOAK_AUDIENCE}
KEYCLOAK_IGNORE_EXP: ${KEYCLOAK_IGNORE_EXP}
ORBC_SERVICE_ACCOUNT_CLIENT_ID: ${ORBC_SERVICE_ACCOUNT_CLIENT_ID}
ORBC_SERVICE_ACCOUNT_AUDIENCE: ${ORBC_SERVICE_ACCOUNT_AUDIENCE}
healthcheck:
test: "curl --silent --fail http://localhost:5002/ > /dev/null || exit 1"
interval: 1m30s
timeout: 10s
retries: 3
start_period: 40s
depends_on:
sql-server-db:
condition: service_healthy
hostname: policy-api
links:
- sql-server-db
ports:
- "5002:5002"
frontend:
container_name: frontend
build:
context: ./frontend/
dockerfile: Dockerfile
args:
VITE_DEPLOY_ENVIRONMENT: ${VITE_DEPLOY_ENVIRONMENT}
VITE_API_VEHICLE_URL: ${VITE_API_VEHICLE_URL}
VITE_POLICY_URL: ${VITE_POLICY_URL}
VITE_KEYCLOAK_ISSUER_URL: ${VITE_KEYCLOAK_ISSUER_URL}
VITE_KEYCLOAK_AUDIENCE: ${VITE_KEYCLOAK_AUDIENCE}
VITE_SITEMINDER_LOG_OFF_URL: ${VITE_SITEMINDER_LOG_OFF_URL}
healthcheck:
test: "curl --silent --fail http://localhost:3000/ > /dev/null || exit 1"
interval: 1m30s
timeout: 10s
retries: 3
start_period: 40s
hostname: frontend
links:
- vehicles-api
- dops-api
- policy-api
ports:
- "3000:3000"
volumes:
- ./frontend:/app:z
- /app/node_modules
scheduler:
container_name: scheduler
build:
context: ./scheduler/
dockerfile: Dockerfile
environment:
NODE_ENV: development
SCHEDULER_API_LOG_LEVEL: ${SCHEDULER_API_LOG_LEVEL}
SCHEDULER_API_TYPEORM_LOG_LEVEL: ${SCHEDULER_API_TYPEORM_LOG_LEVEL}
SCHEDULER_API_MAX_QUERY_EXECUTION_TIME_MS: ${SCHEDULER_API_MAX_QUERY_EXECUTION_TIME_MS}
SCHEDULER_API_MSSQL_MAX_CONNECTION: ${SCHEDULER_API_MSSQL_MAX_CONNECTION}
DB_TYPE: ${DB_TYPE}
MSSQL_HOST: sql-server-db
MSSQL_PORT: ${MSSQL_PORT}
MSSQL_DB: ${MSSQL_DB}
MSSQL_SA_USER: ${MSSQL_SA_USER}
MSSQL_SA_PASSWORD: ${MSSQL_SA_PASSWORD}
MSSQL_ENCRYPT: ${MSSQL_ENCRYPT}
KEYCLOAK_ISSUER_URL: ${KEYCLOAK_ISSUER_URL}
KEYCLOAK_AUDIENCE: ${KEYCLOAK_AUDIENCE}
KEYCLOAK_IGNORE_EXP: ${KEYCLOAK_IGNORE_EXP}
DOPS_CVSE_FORMS_CACHE_TTL_MS: ${DOPS_CVSE_FORMS_CACHE_TTL_MS}
OCIO_S3_ACCESSKEYID: ${OCIO_S3_ACCESSKEYID}
OCIO_S3_BUCKET: ${OCIO_S3_BUCKET}
OCIO_S3_PRESIGNED_URL_EXPIRY: ${OCIO_S3_PRESIGNED_URL_EXPIRY}
OCIO_S3_ENDPOINT: ${OCIO_S3_ENDPOINT}
OCIO_S3_KEY: ${OCIO_S3_KEY}
OCIO_S3_SECRETACCESSKEY: ${OCIO_S3_SECRETACCESSKEY}
TPS_POLL_LIMIT: ${TPS_POLL_LIMIT}
TPS_PENDING_POLLING_INTERVAL: ${TPS_PENDING_POLLING_INTERVAL}
TPS_ERROR_POLLING_INTERVAL: ${TPS_ERROR_POLLING_INTERVAL}
TPS_MONITORING_POLLING_INTERVAL: ${TPS_MONITORING_POLLING_INTERVAL}
CFS_PRIVATE_KEY: ${CFS_PRIVATE_KEY}
CFS_PRIVATE_KEY_PASSPHRASE: ${CFS_PRIVATE_KEY_PASSPHRASE}
CFS_SFTP_USERNAME: ${CFS_SFTP_USERNAME}
CFS_SFTP_HOST: ${CFS_SFTP_HOST}
CFS_SFTP_PORT: ${CFS_SFTP_PORT}
CFS_REMOTE_PATH: ${CFS_REMOTE_PATH}
ORBC_SERVICE_ACCOUNT_CLIENT_ID: ${ORBC_SERVICE_ACCOUNT_CLIENT_ID}
ORBC_SERVICE_ACCOUNT_CLIENT_SECRET: ${ORBC_SERVICE_ACCOUNT_CLIENT_SECRET}
ORBC_SERVICE_ACCOUNT_TOKEN_URL: ${ORBC_SERVICE_ACCOUNT_TOKEN_URL}
ACCESS_API_URL: "http://vehicles-api:5000"
ISSUE_PERMIT_LIMIT: ${ISSUE_PERMIT_LIMIT}
DOC_GEN_LIMIT: ${DOC_GEN_LIMIT}
PERMIT_SCHEDULE_POLLING_INTERVAL: ${PERMIT_SCHEDULE_POLLING_INTERVAL}
healthcheck:
test: "curl --silent --fail http://localhost:5050/ > /dev/null || exit 1"
interval: 1m30s
timeout: 10s
retries: 3
start_period: 40s
depends_on:
sql-server-db:
condition: service_healthy
hostname: scheduler
links:
- sql-server-db
ports:
- "5050:5050"