forked from I-TECH-UW/ci-hie-demo
-
Notifications
You must be signed in to change notification settings - Fork 9
/
docker-compose-remote-traefick.yml
310 lines (290 loc) · 10.1 KB
/
docker-compose-remote-traefick.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
version: '3.8'
services:
###
# Traefik Reverse Proxy
###
traefik:
image: traefik:v2.8.3
restart: unless-stopped
container_name: traefik
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./configs/traefik/traefik.yml:/etc/traefik/traefik.yml
- ./configs/traefik/certs.yml:/etc/traefik/dynamic_conf/certs.yml
- certs:/etc/certs
labels:
- 'traefik.enable=true'
- 'traefik.docker.network=sigdep3_hie'
- 'traefik.http.routers.api.rule=Host(`test2.cihis.org`) && PathPrefix(`/api`) || PathPrefix(`/dashboard`)'
- 'traefik.http.routers.api.service=api@internal'
- 'traefik.http.routers.api.tls=true'
- 'traefik.http.routers.api.entrypoints=web-secure'
networks:
- hie
ports:
- 80:80
- 443:443
- 8282:8080
#OpenHIM -IOL
mongo:
container_name: openhim-mongo
ports:
- "27017:27017"
image: mongo:3.4
networks:
- hie
openhim-core:
container_name: openhim-core
image: jembi/openhim-core:v7.1.0
restart: unless-stopped
environment:
- mongo_url=mongodb://mongo/openhim
- mongo_atnaUrl=mongodb://mongo/openhim
healthcheck:
test: "node /healthcheck.js"
interval: 20s
timeout: 20s
retries: 2
volumes:
- ./configs/openhim/healthcheck.js:/healthcheck.js
depends_on:
- mongo
networks:
- hie
labels:
- 'traefik.enable=true'
- 'traefik.docker.network=sigdep3_hie'
- 'traefik.http.services.openhim-api.loadbalancer.server.port=8080'
- 'traefik.http.services.openhim-api.loadbalancer.server.scheme=https'
- 'traefik.http.routers.openhim-api.service=openhim-api'
- 'traefik.http.routers.openhim-api.tls=true'
- 'traefik.http.routers.openhim-api.entrypoints=web-secure'
- 'traefik.http.routers.openhim-api.rule=Host(`test2.cihis.org`) && PathPrefix(`/openhimcomms`)'
- 'traefik.http.routers.openhim-api.middlewares=openhim-api'
- 'traefik.http.middlewares.openhim-api.stripprefix.prefixes=/openhimcomms'
- 'traefik.http.middlewares.openhim-api.stripprefix.forceSlash=false'
- 'traefik.http.services.openhim-ssl.loadbalancer.server.port=5000'
- 'traefik.http.services.openhim-ssl.loadbalancer.server.scheme=https'
- 'traefik.http.routers.openhim-ssl.service=openhim-ssl'
- 'traefik.http.routers.openhim-ssl.tls=true'
- 'traefik.http.routers.openhim-ssl.entrypoints=web-secure'
- 'traefik.http.routers.openhim-ssl.rule=Host(`test2.cihis.org`) && PathPrefix(`/openhimcore`)'
- 'traefik.http.routers.openhim-ssl.middlewares=openhim-ssl'
- 'traefik.http.middlewares.openhim-ssl.stripprefix.prefixes=/openhimcore'
- 'traefik.http.middlewares.openhim-ssl.stripprefix.forceSlash=false'
openhim-console:
container_name: openhim-console
image: jembi/openhim-console:v1.15.0
volumes:
- ./configs/openhim-console/default.json:/usr/share/nginx/html/config/default.json
healthcheck:
test: "curl -sS http://openhim-console || exit 1"
interval: 10s
timeout: 60s
retries: 3
labels:
- 'traefik.enable=true'
- 'traefik.docker.network=sigdep3_hie'
- 'traefik.http.services.openhim-console.loadbalancer.server.port=80'
- 'traefik.http.services.openhim-console.loadbalancer.server.scheme=http'
- 'traefik.http.routers.openhim-console.service=openhim-console'
- 'traefik.http.routers.openhim-console.tls=true'
- 'traefik.http.routers.openhim-console.entrypoints=web-secure'
- 'traefik.http.routers.openhim-console.rule=Host(`test2.cihis.org`)'
networks:
- hie
# Loads Default OpenHIM Config
openhim-config:
container_name: openhim-config
image: ghcr.io/i-tech-uw/openhim-config:v0.0.0
volumes:
- ./configs/openhim/remote-test-openhim-config.json:/app/test-openhim-config.json
networks:
- hie
# OpenCR - Client Registry
###
opencr:
container_name: opencr
hostname: opencr
image: intrahealth/opencr:latest
restart: unless-stopped
environment:
- NODE_ENV=docker
- HAPI_FHIR_URL=http://opencr-fhir:8080/fhir/metadata
volumes:
- ./configs/opencr/config.json:/src/server/config/config_docker.json
- ./configs/opencr/mediator.json:/src/server/config/mediator.json
- ./configs/opencr/decisionRules.json:/src/server/config/decisionRules.json
- ./configs/opencr/PatientRelationship.json:/src/resources/Relationships/PatientRelationship.json
depends_on:
- opencr-fhir
- openhim-core
labels:
- 'traefik.enable=true'
- 'traefik.docker.network=sigdep3_hie'
- 'traefik.http.routers.opencr.tls=true'
- 'traefik.http.routers.opencr.entrypoints=web-secure'
- 'traefik.http.services.opencr.loadbalancer.server.port=3000'
- 'traefik.http.routers.opencr.rule=Host(`test2.cihis.org`) && PathPrefix(`/crux`) || PathPrefix(`/ocrux`)'
- 'traefik.http.services.opencr.loadbalancer.server.scheme=http'
- 'traefik.http.routers.opencr.service=opencr'
networks:
- hie
opencr-fhir:
image: hapiproject/hapi:v5.5.1
container_name: opencr-fhir
hostname: opencr-fhir
restart: unless-stopped
healthcheck:
test: "curl -sS http://opencr-fhir:8080/fhir/metadata || exit 1"
interval: 90s
timeout: 30s
retries: 3
volumes:
- /data/hapi
# - ./configs/opencr/application.yml:/data/hapi/application.yaml
ports:
- 8081:8080
# env_file:
# - ./configs/opencr/.env
# environment:
# SPRING_CONFIG_LOCATION: 'file:///data/hapi/application.yaml'
networks:
- hie
es:
container_name: es
hostname: es
image: intrahealth/elasticsearch:latest
restart: unless-stopped
environment:
- xpack.security.enabled=false
- discovery.type=single-node
ulimits:
nofile:
soft: 65536
hard: 65536
volumes:
- /usr/share/elasticsearch/data
- ./esplugin/string-similarity:/usr/share/elasticsearch/plugins/string-similarity-scoring
healthcheck:
test: "curl --silent --fail http://es:9200/_cluster/health || exit 1"
networks:
- hie
# Hapi-FHIR - SHR
shr-hapi-fhir:
container_name: shr-hapi-fhir
image: hapiproject/hapi:v5.5.1
restart: always
environment:
- spring.datasource.url=jdbc:postgresql://db/hapi?targetServerType=primary
- spring.datasource.username=admin
- spring.datasource.password=admin
- spring.datasource.driverClassName=org.postgresql.Driver
- spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQL95Dialect
- spring.datasource.hikari.minimumIdle=20
- spring.datasource.hikari.connectionTimeout=60000
- spring.datasource.hikari.idleTimeout=600000
- hapi.fhir.allow_external_references=true
- hapi.fhir.bulk_export_enabled=true
- hapi.fhir.enable_repository_validating_interceptor=true
- hapi.fhir.auto_create_placeholder_reference_targets=true
depends_on:
- db
labels:
- 'traefik.enable=true'
- 'traefik.docker.network=sigdep3_hie'
- 'traefik.http.routers.shr-hapi-fhir.tls=true'
- 'traefik.http.routers.shr-hapi-fhir.entrypoints=web-secure'
- 'traefik.http.services.shr-hapi-fhir.loadbalancer.server.port=8080'
- 'traefik.http.routers.shr-hapi-fhir.rule=Host(`test2.cihis.org`) && PathPrefix(`/fhir`)'
- 'traefik.http.services.shr-hapi-fhir.loadbalancer.server.scheme=http'
- 'traefik.http.routers.shr-hapi-fhir.service=shr-hapi-fhir'
networks:
- hie
#DB for HAPI FHIR for SHR
db:
image: postgres:9.5
restart: always
environment:
POSTGRES_PASSWORD: admin
POSTGRES_USER: admin
POSTGRES_DB: hapi
volumes:
- /var/lib/postgresql/data
- ./init-scripts:/docker-entrypoint-initdb.d # Other dbs like opencr created via script
ports:
- "5432:5432"
networks:
- hie
pipeline-controller:
image: itechuw/fhir-data-pipes:develop
container_name: pipeline-controller
volumes:
- ./configs/remote-streaming-pipeline:/app/config:ro
- ./configs/dwh:/dwh
environment:
- "JAVA_OPTS=$JAVA_OPTS"
ports:
- '8090:8080'
networks:
- hie
spark:
image: docker.io/bitnami/spark:3.3
container_name: spark-thriftserver
command:
- sbin/start-thriftserver.sh
- --driver-memory
# You may need to increase this if your queries/data are too large.
- 4g
environment:
- HIVE_SERVER2_THRIFT_PORT=10000
- "JAVA_OPTS=-Xms1024m -Xmx5024m"
deploy:
resources:
limits:
memory: 4G
reservations:
memory: 4G
ports:
- '10001:10000'
- '4041:4040'
labels:
- 'traefik.enable=true'
- 'traefik.docker.network=sigdep3_hie'
- 'traefik.http.routers.spark.tls=true'
- 'traefik.http.routers.spark.entrypoints=web-secure'
- 'traefik.http.services.spark.loadbalancer.server.port=4040'
- 'traefik.http.routers.spark.rule=Host(`tap-demo.openelisci.org`) && PathPrefix(`/spark`)'
- 'traefik.http.services.spark.loadbalancer.server.scheme=http'
- 'traefik.http.routers.spark.service=spark'
volumes:
- ./configs/dwh:/dwh
# NON-EMBEDDED METASTORE CONFIG:
# If you want to persist the Metastore data, e.g., table and view
# definitions, you can use an external database by adjusting hive-site.xml
#- ./hive-site_example.xml:/opt/bitnami/spark/conf/hive-site.xml
# Note to use an external DB, you need to provide its driver jar too:
#- ./postgresql-42.6.0.jar:/opt/bitnami/spark/jars/postgresql-42.6.0.jar
- spark_vol_single:/opt/bitnami/spark
networks:
- hie
healthcheck:
test: beeline help || exit 1
interval: 10s
retries: 10
start_period: 5s
timeout: 60s
secrets:
datasource.password:
file: ./configs/openelis/properties/datasource.password
common.properties:
file: ./configs/openelis/properties/common.properties
volumes:
db-data:
key_trust-store-volume:
certs-vol:
certs:
keys-vol:
spark_vol_single:
networks:
hie: