-
Notifications
You must be signed in to change notification settings - Fork 159
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
190 lines (185 loc) · 6.13 KB
/
docker-compose.yml
File metadata and controls
190 lines (185 loc) · 6.13 KB
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
version: '3.8'
volumes:
pgdata:
driver: local
blobdata:
driver: local
fhirconfig:
driver: local
driver_opts:
o: bind
type: none
device: ./fhir-server/config
fhirconfigoverrides:
driver: local
driver_opts:
o: bind
type: none
device: ./fhir-server/configDropins/overrides
fhiruserlib:
driver: local
driver_opts:
o: bind
type: none
device: ./fhir-server/userlib
fhirbulkdata:
driver: local
driver_opts:
o: bind
type: none
device: ./fhir-server/bulkdata
services:
postgres:
image: postgres:14-alpine
# https://dba.stackexchange.com/q/275378/46472
shm_size: 256MB
volumes:
- type: volume
source: pgdata
target: /var/lib/postgresql/data/
- type: bind
source: ./postgres/init
target: /docker-entrypoint-initdb.d
environment:
POSTGRES_DB: fhirdb
POSTGRES_USER: fhiradmin
POSTGRES_PASSWORD: change-password
PGDATA: /var/lib/postgresql/data/pgdata
healthcheck:
test: ["CMD-SHELL", "pg_isready -d fhirdb -U fhiradmin"]
start_period: 22s
interval: 5s
timeout: 4s
retries: 3
# "Larger settings for shared_buffers usually require a corresponding increase in max_wal_size,
# to spread out the process of writing large quantities of new or changed data over a longer period of time."
command: "
-c shared_buffers=1GB
-c max_wal_size=2GB
-c max_connections=100
-c max_prepared_transactions=100
-c max_locks_per_transaction=128
"
ports:
- 5432:5432
networks:
- fhir
fhir-server:
image: linuxforhealth/fhir-server:latest
hostname: fhir
volumes:
- type: volume
source: fhirconfig
target: /opt/ol/wlp/usr/servers/defaultServer/config
read_only: true
- type: volume
source: fhirconfigoverrides
target: /opt/ol/wlp/usr/servers/defaultServer/configDropins/overrides
read_only: true
- type: volume
source: fhiruserlib
target: /opt/ol/wlp/usr/servers/defaultServer/userlib
read_only: true
- type: volume
source: fhirbulkdata
target: /output/bulkdata
environment:
TRACE_SPEC: "org.linuxforhealth.fhir.*=INFO"
TRACE_FILE: "stdout"
command: bash -c "
java -jar /opt/fhir-server/tools/fhir-persistence-blob-app-*-cli.jar
--fhir-config-dir /opt/ol/wlp/usr/servers/defaultServer
--create-container --no-dry-run &&
java -jar /opt/fhir-server/tools/fhir-persistence-schema-*-cli.jar
--db-type postgresql --prop db.host=postgres --prop db.port=5432 --prop db.database=fhirdb --prop user=fhiradmin --prop password=change-password
--create-schemas &&
java -jar /opt/fhir-server/tools/fhir-persistence-schema-*-cli.jar
--db-type postgresql --prop db.host=postgres --prop db.port=5432 --prop db.database=fhirdb --prop user=fhiradmin --prop password=change-password
--update-schema-fhir --grant-to fhirserver &&
java -jar /opt/fhir-server/tools/fhir-persistence-schema-*-cli.jar
--db-type postgresql --prop db.host=postgres --prop db.port=5432 --prop db.database=fhirdb --prop user=fhiradmin --prop password=change-password
--update-schema-batch --grant-to fhirbatch &&
java -jar /opt/fhir-server/tools/fhir-persistence-schema-*-cli.jar
--db-type derby --prop db.database=/output/derby/profile --prop db.create=Y
--prop resourceTypes=${TENANT1_PROFILE_RESOURCE_TYPES}
--update-schema &&
java -jar /opt/fhir-server/tools/fhir-persistence-schema-*-cli.jar
--db-type derby --prop db.database=/output/derby/reference --prop db.create=Y
--prop resourceTypes=${TENANT1_REFERENCE_RESOURCE_TYPES}
--update-schema &&
java -jar /opt/fhir-server/tools/fhir-persistence-schema-*-cli.jar
--db-type derby --prop db.database=/output/derby/study1 --prop db.create=Y
--prop resourceTypes=${TENANT1_STUDY1_RESOURCE_TYPES}
--update-schema &&
/opt/ol/wlp/bin/server run"
healthcheck:
start_period: 32s
interval: 20s
timeout: 5s
retries: 3
# https://docs.docker.com/compose/compose-file/#variable-substitution
test: curl --fail -k -u 'fhiruser:change-password' 'https://localhost:9443/fhir-server/api/v4/$$healthcheck'
ports:
- 9080:9080
- 9443:9443
depends_on:
postgres:
condition: service_healthy
networks:
- fhir
fhir-bulkdata-server:
image: linuxforhealth/fhir-bulkdata-server:latest
hostname: fhirbulkdata
volumes:
- type: volume
source: fhirconfig
target: /opt/ol/wlp/usr/servers/defaultServer/config
read_only: true
- type: bind
source: ./fhir-bulkdata-server/configDropins/overrides
target: /opt/ol/wlp/usr/servers/defaultServer/configDropins/overrides
read_only: true
- type: volume
source: fhiruserlib
target: /opt/ol/wlp/usr/servers/defaultServer/userlib
read_only: true
- type: volume
source: fhirbulkdata
target: /output/bulkdata
environment:
TRACE_SPEC: "org.linuxforhealth.fhir.*=INFO"
TRACE_FILE: "stdout"
BATCH_DB_HOSTNAME: postgres
BATCH_DB_USER: fhirbatch
BATCH_DB_PASS: change-password
BATCH_DB_SSL: "false"
BATCH_DB_NAME: fhirdb
command: bash -c "/opt/ol/wlp/bin/server run"
healthcheck:
start_period: 32s
interval: 20s
timeout: 5s
retries: 3
# https://docs.docker.com/compose/compose-file/#variable-substitution
test: curl --fail -k -u 'fhiruser:change-password' 'https://localhost:9445/fhir-bulkdata-server/api/v4/healthcheck'
ports:
- 9082:9082
- 9445:9445
depends_on:
postgres:
condition: service_healthy
networks:
- fhir
azurite:
image: mcr.microsoft.com/azure-storage/azurite
volumes:
- type: volume
source: blobdata
target: /data
ports:
- 10000:10000 # Azurite Blob service
networks:
- fhir
networks:
fhir:
driver: bridge