-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
380 lines (359 loc) · 11.5 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
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
x-enroll_base: &enroll_base
build:
context: ../${ENROLL_DIR:-enroll}
dockerfile: ${PWD}/site/enroll_service/Dockerfile
args:
- BUNDLE_GITHUB__COM=${BUNDLE_GITHUB__COM}
environment:
- SHELL=/bin/bash
- BUNDLE_GITHUB__COM=${BUNDLE_GITHUB__COM}
env_file:
- path: ./site/env.dev.base
required: true
- path: ./site/rabbitmq/rabbitmq.env.dev.base
required: true
- path: env.dev
required: false
services:
#
# Infrastructure Services
#
mongodb:
image: mongo:4.2
hostname: mongodb
#mem_limit: 4000m #uncomment this if you want to replicate mongo memory on prod
volumes:
- mongodb:/data/db
- mongodb_config:/data/configdb
ports:
- 27017:27017
# E.g. usage: '--profile=2' to log all ops to system.profile, including queries
command: ${MONGO_OPTS}
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongo mongodb:27017/test --quiet
rabbitmq:
image: rabbitmq:3.8-management
hostname: rabbitmq
env_file:
- ./site/rabbitmq/rabbitmq.env.dev.base
volumes:
- rabbitmq_etc:/etc/rabbitmq/
- rabbitmq_data:/var/lib/rabbitmq/
- rabbitmq_logs:/var/log/rabbitmq/
- ./site/rabbitmq/rabbitmq.config:/etc/rabbitmq/rabbitmq.config:ro
- ./site/rabbitmq/definitions.json:/etc/rabbitmq/definitions.json:ro
ports:
- 5672:5672
- 15672:15672
healthcheck:
test: rabbitmq-diagnostics check_port_connectivity
redis:
image: redis:7.0
ports:
- 6379
environment:
- ALLOW_EMPTY_PASSWORD=yes
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
#
# Reverse proxy for medicaid_gateway:
# uncomment this or tweak it to your need to replicate an extreme issue with the load balancer
#
# mcgw_nginx:
# image: nginx:1.22
# volumes:
# - ${PWD}/site/mcgw_nginx/nginx.conf:/etc/nginx/nginx.conf:ro
# depends_on:
# medicaid_gateway:
# condition: service_started
# links:
# - medicaid_gateway
# ports:
# - 3030:3030
keycloak:
profiles:
- keycloak
- all
image: quay.io/keycloak/keycloak:23.0.5
# env_file:
# - ./site/keycloak/keycloak.dev.env
environment:
- KEYCLOAK_ADMIN=admin
- KEYCLOAK_ADMIN_PASSWORD=admin
# - KEYCLOAK_IMPORT=/tmp/realm-export.json
ports:
- 8080:8080
healthcheck:
test: curl --fail http://localhost:8080 || exit 1
start_period: 20s
interval: 3m
command: ["start-dev"]
enroll_yard_doc:
<<: *enroll_base
profiles:
- enroll_yard_doc
- all
volumes:
- ../${ENROLL_DIR:-enroll}:/enroll
- ${PWD}/hotpatches/mongoid-enroll.yml:/enroll/config/mongoid.yml:ro
- enroll_node_modules_cache:/enroll/node_modules
- enroll_packs_cache:/enroll/public/packs
- enroll_assets_cache:/enroll/public/assets
- enroll_rails_cache:/enroll/tmp/cache
- ../aca_entities:/aca_entities
depends_on:
enroll:
condition: service_healthy
ports:
- "8808:8808"
command: bash -c "bundle install && bundle exec yard server --reload"
enroll_helper:
<<: *enroll_base
volumes:
- ../${ENROLL_DIR:-enroll}:/enroll
- ${PWD}/hotpatches/mongoid-enroll.yml:/enroll/config/mongoid.yml:ro
- enroll_node_modules_cache:/enroll/node_modules
- enroll_packs_cache:/enroll/public/packs
- enroll_assets_cache:/enroll/public/assets
- enroll_rails_cache:/enroll/tmp/cache
- ../aca_entities:/aca_entities
depends_on:
enroll:
condition: service_healthy
command: bash -c "bundle install && bin/webpack && bundle exec rake 'seed:translations[db/seedfiles/english_translations_seed.rb]'"
#
# Microservices
#
enroll:
<<: *enroll_base
volumes:
- ../${ENROLL_DIR:-enroll}:/enroll
- ${PWD}/hotpatches/cucumber_env.rb:/enroll/features/support/env.rb:ro
- ${PWD}/hotpatches/mongoid-enroll.yml:/enroll/config/mongoid.yml:ro
- ${PWD}/hotpatches/wicked_pdf.rb:/enroll/config/initializers/wicked_pdf.rb:ro #this only works on M1 Macs
- ${PWD}/hotpatches/mongoid-enroll.yml:/enroll/components/financial_assistance/spec/dummy/config/mongoid.yml:ro
- ${PWD}/hotpatches/mongoid-enroll.yml:/enroll/components/benefit_markets/spec/dummy/config/mongoid.yml:ro
- ${PWD}/hotpatches/mongoid-enroll.yml:/enroll/components/notifier/spec/dummy/config/mongoid.yml:ro
- ${PWD}/hotpatches/mongoid-enroll.yml:/enroll/components/sponsored_benefits/spec/dummy/config/mongoid.yml:ro
- ${PWD}/hotpatches/mongoid-enroll.yml:/enroll/components/transport_profiles/spec/dummy/config/mongoid.yml:ro
- ${PWD}/hotpatches/mongoid-enroll.yml:/enroll/components/benefit_sponsors/spec/dummy/config/mongoid.yml:ro
- enroll_node_modules_cache:/enroll/node_modules
- enroll_packs_cache:/enroll/public/packs
- enroll_rails_cache:/enroll/tmp/cache
- enroll_assets_cache:/enroll/public/assets
- ../aca_entities:/aca_entities
- ../event_source:/event_source
# - ${PWD}/hotpatches/keycloack/saml_information.rb:/enroll/config/saml_information.rb:ro
depends_on:
mongodb:
condition: service_healthy
rabbitmq:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: curl --fail http://localhost:3002 || exit 1
start_period: 70s # yes, enroll takes forever to load, tweak it further if you need to
interval: 3m
ports:
- "3002:3002"
# don't set CLIENT here, change it on your env.dev file :)
command: bash -c "rm -rf tmp/pids/server.pid && mkdir -p tmp/pids && bundle install && bundle exec rake configuration:client_configuration_toggler && bin/rails server --port 3002 --binding 0.0.0.0"
fdsh_gateway:
profiles:
- fdsh_gateway
- all
build:
context: ../${FDSH_DIR:-fdsh_gateway}
dockerfile: ${PWD}/site/fdsh_gateway_service/Dockerfile
args:
- BUNDLE_GITHUB__COM=${BUNDLE_GITHUB__COM}
volumes:
- ../${FDSH_DIR:-fdsh_gateway}:/fdsh_gateway
- ${PWD}/hotpatches/mongoid-fdsh.yml:/fdsh_gateway/config/mongoid.yml:ro
- ../aca_entities:/aca_entities
- ../event_source:/event_source
env_file:
- ./site/env.dev.base
- ./site/rabbitmq/rabbitmq.env.dev.base
depends_on:
mongodb:
condition: service_started
rabbitmq:
condition: service_healthy
redis:
condition: service_healthy
command: bash -c "rm -rf tmp/pids/server.pid && mkdir -p tmp/pids && bin/rails webpacker:install && bin/rails server --port 3006 --binding 0.0.0.0"
links:
- mongodb
- rabbitmq
ports:
- "3006:3006"
medicaid_gateway_helper:
profiles:
- medicaid_gateway
- all
build:
context: ../medicaid_gateway
dockerfile: ../ea_enterprise/site/medicaid_gateway_service/Dockerfile
args:
- BUNDLE_GITHUB__COM=${BUNDLE_GITHUB__COM}
volumes:
- ../medicaid_gateway:/medicaid_gateway
- mcg_rails_cache:/medicaid_gateway/tmp/cache
- mcg_bundle:/bundle
- mcg_node_modules:/medicaid_gateway/node_modules
- mcg_packs:/medicaid_gateway/public/packs
- ${PWD}/hotpatches/MG-stimulus.rb:/medicaid_gateway/config/initializers/stimulus_reflex.rb
env_file:
- ./site/env.dev.base
- ./site/rabbitmq/rabbitmq.env.dev.base
- ./site/medicaid_gateway_service/env.dev.base
- env.dev
depends_on:
medicaid_gateway:
condition: service_healthy
links:
- mitc
- mongodb
- rabbitmq
- redis
command: bash -c "bundle exec rake configuration:client_configuration_toggler client=$${CLIENT} && bin/webpack"
medicaid_gateway:
profiles:
- medicaid_gateway
- all
build:
context: ../${MG_DIR:-medicaid_gateway}
dockerfile: ${PWD}/site/medicaid_gateway_service/Dockerfile
args:
- BUNDLE_GITHUB__COM=${BUNDLE_GITHUB__COM}
volumes:
- ../${MG_DIR:-medicaid_gateway}:/medicaid_gateway
- mcg_rails_cache:/medicaid_gateway/tmp/cache
- mcg_bundle:/bundle
- mcg_node_modules:/medicaid_gateway/node_modules
- mcg_packs:/medicaid_gateway/public/packs
- ../aca_entities:/aca_entities
- ${PWD}/hotpatches/MG-stimulus.rb:/medicaid_gateway/config/initializers/stimulus_reflex.rb
env_file:
- ./site/env.dev.base
- ./site/rabbitmq/rabbitmq.env.dev.base
- ./site/medicaid_gateway_service/env.dev.base
- env.dev
depends_on:
mongodb:
condition: service_healthy
rabbitmq:
condition: service_healthy
redis:
condition: service_healthy
links:
- mitc
- mongodb
- rabbitmq
- redis
ports:
- "3005:3005"
healthcheck:
test: curl --fail http://localhost:3005 || exit 1
start_period: 20s
interval: 3m
command: bash -c "rm -rf tmp/pids/server.pid && mkdir -p tmp/pids && bin/rails server --port 3005 --binding 0.0.0.0"
fti:
profiles:
- fti
- all
build:
context: ../${FTI_DIR:-fti}
dockerfile: ${PWD}/site/fti/Dockerfile
args:
- BUNDLE_GITHUB__COM=${BUNDLE_GITHUB__COM}
env_file:
- ./site/env.dev.base
- ./site/rabbitmq/rabbitmq.env.dev.base
- env.dev
depends_on:
mongodb:
condition: service_healthy
rabbitmq:
condition: service_healthy
redis:
condition: service_healthy
ports:
- "3007:3007"
volumes:
- ../fti:/fti
- ${PWD}/hotpatches/mongoid-fti.yml:/fti/config/mongoid.yml:ro
command: bash -c "rm -rf tmp/pids/server.pid && mkdir -p tmp/pids && bundle install && rails webpacker:install:erb && bin/rails server --port 3007 --binding 0.0.0.0"
mitc:
profiles:
- medicaid_gateway
- all
build:
context: ../${MITC_DIR:-medicaid_eligibility}
dockerfile: ${PWD}/site/mitc_service/Dockerfile
args:
- BUNDLE_GITHUB__COM=${BUNDLE_GITHUB__COM}
volumes:
- ../${MITC_DIR:-medicaid_eligibility}:/mitc
- mitc_gem_cache:/usr/local/bundle/2.3
- type: tmpfs
target: /mitc/tmp/pids/
command: bash -c "bin/rails server --port 3001 --binding 0.0.0.0"
ports:
- "3001:3001"
depends_on:
redis:
condition: service_healthy
links:
- redis
polypress:
profiles:
- polypress
- all
build:
context: ../${POLY_DIR:-polypress}
dockerfile: ${PWD}/site/polypress_service/Dockerfile
args:
- BUNDLE_GITHUB__COM=${BUNDLE_GITHUB__COM}
volumes:
- ../${POLY_DIR:-polypress}:/polypress
- polypress_gem_cache:/usr/local/bundle/2.7
- ${PWD}/hotpatches/wicked_pdf.rb:/polypress/config/initializers/wicked_pdf.rb:ro #this only works on M1 Macs
env_file:
- ./site/env.dev.base
- ./site/rabbitmq/rabbitmq.env.dev.base
depends_on:
mongodb:
condition: service_started
rabbitmq:
condition: service_healthy
ports:
- "3003:3003"
command: bash -c "rm -rf tmp/pids/server.pid && mkdir -p tmp/pids && bundle install && bundle exec bin/webpack && bundle exec bin/rails server --port 3003 --binding 0.0.0.0"
links:
- mongodb
- rabbitmq
volumes:
mitc:
fdsh_gem_cache:
polypress_gem_cache:
mitc_gem_cache:
node_modules_cache:
packs_cache:
mongodb:
mongodb_config:
rabbitmq_etc:
rabbitmq_data:
rabbitmq_logs:
mcg_rails_cache:
mcg_bundle:
mcg_node_modules:
mcg_packs:
mcg_gem_cache:
enroll_gem_cache:
enroll_node_modules_cache:
enroll_packs_cache:
enroll_rails_cache:
enroll_assets_cache: