-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
313 lines (287 loc) · 10.2 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
version: '3.6'
##### OpenELIS3
x-logging:
&local-logging
driver: "local"
options:
max-size: "20m"
max-file: "50"
x-loki-logging:
&loki-logging
driver: "loki"
options:
max-size: "20m"
max-file: "50"
loki-url: "[% loki_url %]"
loki-external-labels: "container_name={{.Name}},hostname=[% host_name %]"
loki-pipeline-stages: |
- multiline:
firstline: '^\d{4}-\d{2}-\d{2}[T ]?\d{2}:\d{2}:\d{2}.\d{3}'
- labeldrop:
- compose_project
- compose_service
- filename
- source
- stream
- swarm_service
- swarm_stack
services:
certs:
container_name: oe-certs
image: itechuw/certgen:main
restart: always
environment:
- KEYSTORE_PW="kspass"
- TRUSTSTORE_PW="tspass"
volumes:
- key_trust-store-volume:/etc/openelis-global
- keys-vol:/etc/ssl/private/
- certs-vol:/etc/ssl/certs/
db.openelis.org:
container_name: openelisglobal-database
image: postgres:14.4
ports:
- "15432:5432"
restart: always
env_file:
- ./volumes/openelis/database/database.env
volumes:
# preserves the database between containers
- oe-db-data:/var/lib/postgresql/data
# files here will run on install
- ./volumes/openelis/database/dbInit:/docker-entrypoint-initdb.d
logging: *local-logging
healthcheck:
test: [ "CMD", "pg_isready", "-q", "-d", "clinlims", "-U", "clinlims" ]
timeout: 45s
interval: 10s
retries: 10
oe.openelis.org:
container_name: openelisglobal-webapp
image: itechuw/openelis-global-2:develop
depends_on:
- db.openelis.org
- fhir.openelis.org
- certs
ports:
- "8080:8080"
- "8443:8443"
restart: always
logging: *local-logging
environment:
- DEFAULT_PW=adminADMIN!
- TZ=Africa/Nairobi
# context.xml doesn't seem to be able to pick up environment variables directly, so we are passing them in as CATALINA_OPTS
- CATALINA_OPTS= -Ddatasource.url=jdbc:postgresql://db.openelis.org:5432/clinlims -Ddatasource.username=clinlims
volumes:
- key_trust-store-volume:/etc/openelis-global
- ./volumes/openelis/plugins/:/var/lib/openelis-global/plugins
- ./volumes/openelis/tomcat/oe_server.xml:/usr/local/tomcat/conf/server.xml
- ./volumes/openelis/logs/oeLogs:/var/lib/openelis-global/logs
- ./volumes/openelis/logs/tomcatLogs/:/usr/local/tomcat/logs
secrets:
- source: datasource.password
- source: common.properties
fhir.openelis.org:
container_name: external-fhir-api
image: hapiproject/hapi:v6.6.0-tomcat
ports:
- "8081:8080"
- "8444:8443"
depends_on:
- db.openelis.org
- certs
restart: always
environment:
SPRING_CONFIG_LOCATION: file:///run/secrets/hapi_application.yaml
TZ: Africa/Nairobi
JAVA_OPTS: "-Djavax.net.ssl.trustStore=/etc/openelis-global/truststore
-Djavax.net.ssl.trustStorePassword=tspass
-Djavax.net.ssl.trustStoreType=pkcs12
-Djavax.net.ssl.keyStore=/etc/openelis-global/keystore
-Djavax.net.ssl.keyStorePassword=kspass
-Djavax.net.ssl.keyStoreType=pkcs12"
logging: *local-logging
volumes:
- key_trust-store-volume:/etc/openelis-global
- ./volumes/openelis/tomcat/hapi_server.xml:/opt/bitnami/tomcat/conf/server.xml
secrets:
- source: hapi_application.yaml
frontend.openelis.org:
image: itechuw/openelis-global-2-frontend:develop
container_name: openelisglobal-front-end
environment:
- CHOKIDAR_USEPOLLING=true
logging: *local-logging
tty: true
depends_on:
- oe.openelis.org
proxy:
image: nginx:1.15-alpine
container_name: openelisglobal-proxy
ports:
# - 80:80
- 443:443
volumes:
- certs-vol:/etc/nginx/certs/
- keys-vol:/etc/nginx/keys/
- ./volumes/openelis/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
# - /KEYSTORE_PASSWORD:/etc/nginx/private/key_pass
# - /etc/openelis-global/nginx.cert.pem:/etc/nginx/certs/cert.crt
# - /etc/openelis-global/nginx.key.pem:/etc/nginx/certs/cert.key
restart: unless-stopped
logging: *local-logging
depends_on:
- certs
- frontend.openelis.org
autoheal:
container_name: autoheal-oe
image: willfarrell/autoheal:1.2.0
tty: true
restart: always
environment:
AUTOHEAL_CONTAINER_LABEL: all
TZ: Africa/Nairobi
logging: *local-logging
volumes:
- /var/run/docker.sock:/var/run/docker.sock
##### OpenMRS3
gateway:
image: openmrs/openmrs-reference-application-3-gateway:dev3
container_name: openmrs-proxy
restart: "unless-stopped"
depends_on:
- frontend
- backend
ports:
- "80:80"
frontend:
image: openmrs/openmrs-reference-application-3-frontend:dev3
container_name: openmrs-frontend
restart: "unless-stopped"
environment:
SPA_PATH: /openmrs/spa
API_URL: /openmrs
SPA_CONFIG_URLS: /openmrs/spa/config-core_demo.json
SPA_DEFAULT_LOCALE:
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/"]
timeout: 5s
depends_on:
- backend
backend:
image: openmrs/openmrs-reference-application-3-backend:dev3
container_name: openmrs-backend
restart: "unless-stopped"
depends_on:
- db
environment:
OMRS_CONFIG_MODULE_WEB_ADMIN: "true"
OMRS_CONFIG_AUTO_UPDATE_DATABASE: "true"
OMRS_CONFIG_CREATE_TABLES: "true"
OMRS_CONFIG_CONNECTION_SERVER: db
OMRS_CONFIG_CONNECTION_DATABASE: openmrs
OMRS_CONFIG_CONNECTION_USERNAME: ${OPENMRS_DB_USER:-openmrs}
OMRS_CONFIG_CONNECTION_PASSWORD: ${OPENMRS_DB_PASSWORD:-openmrs}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/openmrs"]
timeout: 5s
volumes:
- ./volumes/openmrs/distro/configuration:/openmrs/distribution/openmrs_config
- ./volumes/openmrs/modules/labonfhir-1.5.0-SNAPSHOT.omod:/openmrs/distribution/openmrs_modules/labonfhir-1.5.0-SNAPSHOT.omod
- ./volumes/openmrs/modules/event-2.11.0-SNAPSHOT.omod:/openmrs/distribution/openmrs_modules/event-2.11.0-SNAPSHOT.omod
- openmrs-data:/openmrs/data
# MySQL DB
db:
image: mysql:8.0
container_name: openmrs-db
restart: "unless-stopped"
command: "mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_general_ci"
healthcheck:
test: "mysql --user=${OMRS_DB_USER:-openmrs} --password=${OMRS_DB_PASSWORD:-openmrs} --execute \"SHOW DATABASES;\""
interval: 3s
timeout: 1s
retries: 5
environment:
MYSQL_DATABASE: openmrs
MYSQL_USER: ${OMRS_DB_USER:-openmrs}
MYSQL_PASSWORD: ${OMRS_DB_PASSWORD:-openmrs}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-openmrs}
volumes:
- omrs-db-data:/var/lib/mysql
#OpenHIM -IOL
mongo:
image: mongo:3.4
container_name: openhim-mongo
ports:
- "27017:27017"
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:
- ./volumes/openhim/configs/healthcheck.js:/healthcheck.js
ports:
- "8085:8080"
- "5000:5000"
- "5001:5001"
- "5050:5050"
- "5051:5051"
- "5052:5052"
- "7788:7788"
depends_on:
- mongo
openhim-console:
container_name: openhim-console
image: jembi/openhim-console:v1.15.0
ports:
- "9000:80"
volumes:
- ./volumes/openhim/configs/default.json:/usr/share/nginx/html/config/default.json
depends_on:
- openhim-core
- openhim-config
healthcheck:
test: "curl -sS http://openhim-console || exit 1"
interval: 10s
timeout: 60s
retries: 3
# Loads Default OpenHIM Config
openhim-config:
container_name: openhim-config
image: ghcr.io/i-tech-uw/openhim-config:v0.0.0
volumes:
- ./volumes/openhim/configs/openhim-config.json:/app/test-openhim-config.json
# Hapi-FHIR - SHR
shr-hapi-fhir:
container_name: shr-hapi-fhir
image: hapiproject/hapi:v5.5.1
ports:
- "8090:8080"
restart: always
environment:
- hapi.fhir.auto_create_placeholder_reference_targets=true
- hapi.fhir.allow_placeholder_references=true
- hapi.fhir.allow_external_references=true
secrets:
datasource.password:
file: ./volumes/openelis/properties/datasource.password
common.properties:
file: ./volumes/openelis/properties/common.properties
hapi_application.yaml:
file: ./volumes/openelis/properties/hapi_application.yaml
volumes:
oe-db-data:
key_trust-store-volume:
certs-vol:
keys-vol:
openmrs-data:
omrs-db-data: