forked from smart-on-fhir/smart-dev-sandbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
143 lines (133 loc) · 5.4 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
version: '2.2'
# We create one volume for each supported FHIR version. These volumes will
# contain and persist the H2 database file
volumes:
r2-database:
r3-database:
r4-database:
services:
r2: # ------------------------------------------------------------------------
container_name: hapi-r2
image: $R2_IMAGE
environment:
PORT: $R2_PORT
ports:
- $R2_PORT:8080
volumes:
- "r2-database:/usr/local/tomcat/target/database"
command: ["sh", "-c", "
envsubst < /tmp/hapi.properties.tpl > /config/hapi.properties &&
envsubst < /tmp/server.xml > /usr/local/tomcat/conf/server.xml &&
catalina.sh run"]
cpu_count: $R2_CPU_CORES
mem_limit: $R2_MEMORY
scale : $R2_ENABLED
r3: # ------------------------------------------------------------------------
container_name: hapi-r3
image: $R3_IMAGE
environment:
PORT: $R3_PORT
ports:
- $R3_PORT:8080
volumes:
- "r3-database:/usr/local/tomcat/target/database"
command: ["sh", "-c", "
envsubst < /tmp/hapi.properties.tpl > /config/hapi.properties &&
envsubst < /tmp/server.xml > /usr/local/tomcat/conf/server.xml &&
catalina.sh run"]
cpu_count: $R3_CPU_CORES
mem_limit: $R3_MEMORY
scale: $R3_ENABLED
r4: # ------------------------------------------------------------------------
container_name: hapi-r4
image: $R4_IMAGE
environment:
PORT: $R4_PORT
HOST: $HOST
ports:
- $R4_PORT:8080
volumes:
- "r4-database:/usr/local/tomcat/target/database:delegated"
command: ["sh", "-c", "
envsubst < /tmp/hapi.properties.tpl > /config/hapi.properties &&
envsubst < /tmp/server.xml > /usr/local/tomcat/conf/server.xml &&
catalina.sh run"]
cpu_count: $R4_CPU_CORES
mem_limit: $R4_MEMORY
scale: $R4_ENABLED
fhir-viewer: # ---------------------------------------------------------------
container_name: fhir-viewer
image: smartonfhir/fhir-viewer
scale: $FHIR_VIEWER_ENABLED
ports:
- "${FHIR_VIEWER_PORT}:80"
patient-browser: # -----------------------------------------------------------
container_name: patient-browser
image: smartonfhir/patient-browser:latest
volumes:
- ./patient-browser:/usr/share/nginx/html/config
environment:
HOST : "${HOST}"
FHIR_VIEWER_PORT: "${FHIR_VIEWER_PORT}"
R2_PORT : "${R2_PORT}"
R3_PORT : "${R3_PORT}"
R4_PORT : "${R4_PORT}"
ports:
- $PATIENT_BROWSER_PORT:80
command: ["sh", "-c", "
envsubst < /usr/share/nginx/html/config/r2.tpl > \/usr/share/nginx/html/config/r2-local.json5 &&
envsubst < /usr/share/nginx/html/config/r3.tpl > \/usr/share/nginx/html/config/r3-local.json5 &&
envsubst < /usr/share/nginx/html/config/r4.tpl > \/usr/share/nginx/html/config/r4-local.json5 &&
nginx -g 'daemon off;'"]
scale: $PATIENT_BROWSER_ENABLED
index: # ---------------------------------------------------------------------
container_name: home-page
image: nginx:alpine
volumes:
- ./www:/usr/share/nginx/html
ports:
- $CONTROL_PANEL_PORT:80
environment:
HOST : "${HOST}"
R2_PORT : "${R2_PORT}"
R4_PORT : "${R4_PORT}"
R3_PORT : "${R3_PORT}"
R4_PORT : "${R4_PORT}"
PATIENT_BROWSER_PORT : "${PATIENT_BROWSER_PORT}"
FHIR_VIEWER_PORT : "${FHIR_VIEWER_PORT}"
LAUNCHER_PORT : "${LAUNCHER_PORT}"
R2_ENABLED : "${R2_ENABLED}"
R3_ENABLED : "${R3_ENABLED}"
R4_ENABLED : "${R4_ENABLED}"
PATIENT_BROWSER_ENABLED: "${PATIENT_BROWSER_ENABLED}"
FHIR_VIEWER_ENABLED : "${FHIR_VIEWER_ENABLED}"
LAUNCHER_ENABLED : "${LAUNCHER_ENABLED}"
ISSUES_URL : "https://github.com/smart-on-fhir/smart-dev-sandbox/issues"
command: sh -c "envsubst < /usr/share/nginx/html/template.html > /usr/share/nginx/html/index.html && nginx -g 'daemon off;'"
scale: $CONTROL_PANEL_ENABLED
smart-launcher: # ------------------------------------------------------------
container_name: launcher
image: smartonfhir/smart-launcher:latest
environment:
HOST : "${HOST}"
NODE_ENV : "production"
LAUNCHER_BASE_URL : "http://${HOST}:${LAUNCHER_PORT}"
BASE_URL : "http://${HOST}:${LAUNCHER_PORT}"
FHIR_SERVER_R2 : "http://${HOST}:${R2_PORT}/hapi-fhir-jpaserver/fhir"
FHIR_SERVER_R3 : "http://${HOST}:${R3_PORT}/hapi-fhir-jpaserver/fhir"
FHIR_SERVER_R4 : "http://${HOST}:${R4_PORT}/hapi-fhir-jpaserver/fhir"
FHIR_SERVER_R2_INTERNAL: "http://r2:8080/hapi-fhir-jpaserver/fhir"
FHIR_SERVER_R3_INTERNAL: "http://r3:8080/hapi-fhir-jpaserver/fhir"
FHIR_SERVER_R4_INTERNAL: "http://r4:8080/hapi-fhir-jpaserver/fhir"
DISABLE_SANDBOXES : "1"
CDS_SANDBOX_URL : "https://sandbox.cds-hooks.org"
PICKER_CONFIG_R2 : "r2-local"
PICKER_CONFIG_R3 : "r3-local"
PICKER_CONFIG_R4 : "r4-local"
PICKER_ORIGIN : "http://${HOST}:${PATIENT_BROWSER_PORT}"
STU2_ENABLED : "${R2_ENABLED}"
STU3_ENABLED : "${R3_ENABLED}"
STU4_ENABLED : "${R4_ENABLED}"
ports:
- $LAUNCHER_PORT:80
scale: $LAUNCHER_ENABLED