-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
executable file
·163 lines (152 loc) · 4.65 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
version: "3.8"
services:
# Networking
gateway:
container_name: openmrs-gateway
image: openmrs/openmrs-reference-application-3-gateway:${TAG:-nightly}
depends_on:
- frontend
- backend
ports:
- "80:80"
# OpenMRS 3 Frontend
frontend:
container_name: openmrs-frontend
image: msfocg/openmrs3-frontend:${HOSTNAME_TAG:-dev}
environment:
SPA_PATH: /openmrs/spa
API_URL: /openmrs
SPA_CONFIG_URLS: /openmrs/spa/custom-config.json
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/"]
timeout: 5s
depends_on:
- backend
# OpenMRS Core Backend
backend:
container_name: openmrs-backend
image: msfocg/openmrs3-backend:${HOSTNAME_TAG:-dev}
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:
- openmrs-data:/openmrs/data
- ./distro/configuration:/openmrs/distribution/openmrs_config
- ./distro/openmrs_modules/event-2.10.0.omod:/openmrs/distribution/openmrs_modules/event-2.10.0.omod
- ./distro/openmrs_modules/labonfhir-1.3.1-SNAPSHOT.omod:/openmrs/distribution/openmrs_modules/labonfhir-1.3.1-SNAPSHOT.omod
# MariaDB
db:
container_name: openmrs-db
image: mariadb:10.8.2
command: "mysqld --character-set-server=utf8 --collation-server=utf8_general_ci"
healthcheck:
test: "mysql --user=${OMRS_DB_USER:-openmrs} --password=${OMRS_DB_PASSWORD:-openmrs} --execute \"SHOW DATABASES;\""
interval: 3s
timeout: 1s
retries: 5
deploy:
replicas: 1
update_config:
parallelism: 2
delay: 10s
order: stop-first
environment:
MYSQL_DATABASE: openmrs
MYSQL_USER: ${OMRS_DB_USER:-openmrs}
MYSQL_PASSWORD: ${OMRS_DB_PASSWORD:-openmrs}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-openmrs}
ports:
- 3307:3306
volumes:
- db-data:/var/lib/mysql
- ./FHIR/mysql.cnf:/etc/mysql/conf.d/custom.cnf # mysql config preconfigured to allow binlog/debezium
# FHIR store
fhir:
profiles: ["fhir"]
container_name: external-fhir-api
image: hapiproject/hapi:latest
ports:
- "8081:8080"
restart: always
environment:
- hapi.fhir.auto_create_placeholder_reference_targets=true
- hapi.fhir.allow_placeholder_references=true
- hapi.fhir.allow_external_references=true
# FHIR data streaming
streaming-binlog:
profiles: ["fhir"]
image: openmrsinfra/openmrs-fhir-analytics:plir-binlog
container_name: plir-streaming-pipeline
network_mode: host
healthcheck:
test: "exit 0"
volumes:
- ./FHIR/dbz_event_to_fhir_config.json:/deployments/dbz_event_to_fhir_config.json
environment:
- OPENMRS_URL=http://localhost/openmrs
- OPENMRS_USERNAME=admin
- OPENMRS_PASSWORD=Admin123
- SINK_URL=http://localhost:8081/fhir
- SINK_USERNAME=hapi
- SINK_PASSWORD=Admin123
- JDBC_FETCH_SIZE=10000
- JDBC_MAX_POOL_SIZE=50
- JDBC_INITIAL_POOL_SIZE=10
- JDBC_URL=jdbc:mysql://localhost:3307/openmrs
- JDBC_DRIVER_CLASS=com.mysql.cj.jdbc.Driver
- FHIR_DEBEZIUM_CONFIG_PATH=/deployments/dbz_event_to_fhir_config.json
# Zabbix
zabbix-server:
profiles: ["zabbix"]
image: zabbix/zabbix-server-mysql
container_name: zabbix-server
ports:
- "10051:10051"
environment:
DB_SERVER_HOST: "mysql-server"
MYSQL_USER: "zabbix"
MYSQL_PASSWORD: "zabbix"
MYSQL_DATABASE: "zabbix"
depends_on:
- zabbix-db
zabbix-web:
profiles: ["zabbix"]
image: zabbix/zabbix-web-nginx-mysql
container_name: zabbix-web
ports:
- "8082:8080"
- "8443:8443"
environment:
DB_SERVER_HOST: "mysql-server"
MYSQL_USER: "zabbix"
MYSQL_PASSWORD: "zabbix"
MYSQL_DATABASE: "zabbix"
ZBX_SERVER_HOST: "zabbix-server"
PHP_TZ: "Europe/London"
depends_on:
- zabbix-server
zabbix-db:
profiles: ["zabbix"]
image: mysql:8.0
container_name: zabbix-db
volumes:
- zabbix-db-storage:/var/lib/mysql
environment:
MYSQL_USER: "zabbix"
MYSQL_PASSWORD: "zabbix"
MYSQL_DATABASE: "zabbix"
MYSQL_ROOT_PASSWORD: "root_password"
volumes:
openmrs-data: ~
db-data: ~
zabbix-db-storage: ~