-
Notifications
You must be signed in to change notification settings - Fork 11
/
docker-compose-2x.yml
156 lines (144 loc) · 4.86 KB
/
docker-compose-2x.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
version: '3.6'
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"
networks:
- openelis-network
volumes:
- key_trust-store-volume:/etc/openelis-global
db.openelis.org:
container_name: openelisglobal-database
image: postgres:14.4
ports:
- "15432:5432"
restart: always
env_file:
- ./volumes/database/database.env
volumes:
# preserves the database between containers
- db-data:/var/lib/postgresql/data
# files here will run on install
- ./volumes/database/dbInit:/docker-entrypoint-initdb.d
networks:
- openelis-network
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:master
depends_on:
- db.openelis.org
- certs
ports:
- "8080:8080"
- "8443:8443"
restart: always
networks:
openelis-network:
ipv4_address: 172.20.1.121
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/plugins/:/var/lib/openelis-global/plugins
- ./volumes/tomcat/oe_server_2x.xml:/usr/local/tomcat/conf/server.xml
- ./volumes/logs/oeLogs:/var/lib/openelis-global/logs
- ./volumes/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
networks:
- openelis-network
logging: *local-logging
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"
volumes:
- key_trust-store-volume:/etc/openelis-global
- ./volumes/tomcat/hapi_server.xml:/opt/bitnami/tomcat/conf/server.xml
secrets:
- source: hapi_application.yaml
autoheal:
container_name: autoheal-oe
image: willfarrell/autoheal:1.2.0
tty: true
restart: always
networks:
- openelis-network
environment:
AUTOHEAL_CONTAINER_LABEL: all
TZ: Africa/Nairobi
logging: *local-logging
volumes:
- /var/run/docker.sock:/var/run/docker.sock
secrets:
datasource.password:
file: ./volumes/properties/datasource.password
common.properties:
file: ./volumes/properties/common.properties
hapi_application.yaml:
file: ./volumes/properties/hapi_application.yaml
networks:
openelis-network:
name: openelis-network
driver: bridge
ipam:
config:
- subnet: 172.20.1.0/24
volumes:
db-data:
key_trust-store-volume: