forked from ClarityNLP/ClarityNLP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.localhost.yml
378 lines (361 loc) · 12.6 KB
/
docker-compose.localhost.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
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
version: "3.3"
networks:
clarity:
driver: bridge
volumes:
redisdata:
nlp-solrdata:
nlp-pgdata:
nlp-mongodata:
ingest-files:
ingest-mongodata:
vhost:
html:
dhparam:
htpasswd:
luigi-frontend:
luigi-state:
luigi-logs:
nlp-api-data:
services:
identity-provider:
container_name: IDENTITY_PROVIDER
hostname: ${IDENTITY_PROVIDER_HOSTNAME}
image: claritynlp/identity-provider
expose:
- ${IDENTITY_PROVIDER_CONTAINER_PORT}
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=${ASPNETCORE_URLS}
- PROTOCOL=http
- HOST=${HOST}
- IDP_URL=${HOST}:${ENTRYPOINT_NON_SSL}/${IDP_PREFIX}
- DASHBOARD_URL=${HOST}:${ENTRYPOINT_NON_SSL}/${DASHBOARD_PREFIX}
- INGEST_URL=${HOST}:${ENTRYPOINT_NON_SSL}/${INGEST_PREFIX}
- RESULTS_URL=${HOST}:${ENTRYPOINT_NON_SSL}/${RESULTS_PREFIX}
- ADMIN_USERNAME=${ADMIN_USERNAME}
- ADMIN_PASSWORD=${ADMIN_PASSWORD}
- CLIENT_CLI_SECRET=${CLIENT_CLI_SECRET}
- CLIENT_NLPASS_SECRET=${CLIENT_NLPASS_SECRET}
- IS_VHOST=false
networks:
- clarity
identity-and-access-proxy:
container_name: IDENTITY_AND_ACCESS_PROXY
hostname: identity-and-access-proxy
image: claritynlp/identity-and-access-proxy
expose:
- ${IDENTITY_AND_ACCESS_PROXY_CONTAINER_PORT}
entrypoint: pm2-runtime
command: proxy.js
environment:
- IDENTITY_PROVIDER_HOSTNAME=${IDENTITY_PROVIDER_HOSTNAME}
- IDENTITY_PROVIDER_CONTAINER_PORT=${IDENTITY_PROVIDER_CONTAINER_PORT}
networks:
- clarity
nlp-api:
restart: always
container_name: NLP_API
hostname: ${NLP_API_HOSTNAME}
image: claritynlp/nlp-api
volumes:
- nlp-api-data:/tmp
expose:
- ${NLP_API_CONTAINER_PORT}
entrypoint:
- /api/wait-for-it-extra.sh
- ${NLP_SOLR_HOSTNAME}:${NLP_SOLR_CONTAINER_PORT}
- ${NLP_MONGO_HOSTNAME}:${NLP_MONGO_CONTAINER_PORT}
- ${SCHEDULER_HOSTNAME}:${SCHEDULER_CONTAINER_PORT}
- ${NLP_PG_HOSTNAME}:${NLP_PG_CONTAINER_PORT}
- ${REDIS_HOSTNAME}:${REDIS_CONTAINER_PORT}
- --timeout=420
- --
command: gunicorn api --config config.py --timeout 500 -b :5000
environment:
- NLP_API_TMP_DIR=${NLP_API_TMP_DIR}
- NLP_API_LOG_DIR=${NLP_API_LOG_DIR}
- NLP_SOLR_URL=${NLP_SOLR_URL}
- NLP_API_DEBUG_MODE=${NLP_API_DEBUG_MODE}
- NLP_EXPRESSION_EVALUATOR=${NLP_EXPRESSION_EVALUATOR}
- NLP_API_URL=${NLP_API_URL}
- BATCH_SIZE=${BATCH_SIZE}
- RESULTS_CLIENT_URL=${RESULTS_URL}
- USE_MEMORY_CACHING=${USE_MEMORY_CACHING}
- USE_PRECOMPUTED_SEGMENTATION=${USE_PRECOMPUTED_SEGMENTATION}
- USE_REORDERED_NLPQL=${USE_REORDERED_NLPQL}
- USE_REDIS_CACHING=${USE_REDIS_CACHING}
- OHDSI_WEBAPI_URL=${OHDSI_WEBAPI_URL}
- SOLR_TEXT_FIELD=${SOLR_TEXT_FIELD}
- SOLR_ID_FIELD=${SOLR_ID_FIELD}
- SOLR_REPORT_ID_FIELD=${SOLR_REPORT_ID_FIELD}
- SOLR_SOURCE_FIELD=${SOLR_SOURCE_FIELD}
- SOLR_REPORT_DATE_FIELD=${SOLR_REPORT_DATE_FIELD}
- SOLR_SUBJECT_FIELD=${SOLR_SUBJECT_FIELD}
- SOLR_REPORT_TYPE_FIELD=${SOLR_REPORT_TYPE_FIELD}
- NLP_PG_HOSTNAME=${NLP_PG_HOSTNAME}
- NLP_PG_DATABASE=${NLP_PG_DATABASE}
- NLP_PG_USER=${NLP_PG_USER}
- NLP_PG_PASSWORD=${NLP_PG_PASSWORD}
- NLP_PG_CONTAINER_PORT=${NLP_PG_CONTAINER_PORT}
- NLP_MONGO_HOSTNAME=${NLP_MONGO_HOSTNAME}
- NLP_MONGO_CONTAINER_PORT=${NLP_MONGO_CONTAINER_PORT}
- NLP_MONGO_DATABASE=${NLP_MONGO_DATABASE}
- NLP_MONGO_WORKING_INDEX=${NLP_MONGO_WORKING_INDEX}
- NLP_MONGO_WORKING_COLLECTION=${NLP_MONGO_WORKING_COLLECTION}
- NLP_MONGO_USERNAME=${NLP_MONGO_USERNAME}
- NLP_MONGO_PASSWORD=${NLP_MONGO_PASSWORD}
- LUIGI_SCHEDULER_URL=${LUIGI_SCHEDULER_URL}
- LUIGI_URL=${LUIGI_URL}
- LUIGI_WORKERS=${LUIGI_WORKERS}
- REDIS_HOSTNAME=${REDIS_HOSTNAME}
- REDIS_HOST_PORT=${REDIS_HOST_PORT}
- REDIS_CONTAINER_PORT=${REDIS_CONTAINER_PORT}
networks:
- clarity
depends_on:
- redis
- nlp-solr
- nlp-mongo
- nlp-postgres
- luigid
luigid:
restart: always
container_name: scheduler
hostname: scheduler
image: axiom/docker-luigi:2.7.1
expose:
- ${SCHEDULER_CONTAINER_PORT}
volumes:
- luigi-frontend:/usr/local/lib/python2.7/site-packages/luigi/static/visualiser
- luigi-state:/luigi/state
- luigi-logs:/luigi/logs
networks:
- clarity
frontend-ctrl:
restart: always
image: claritynlp/front-ctrl
volumes:
- luigi-frontend:/usr/local/lib/python2.7/site-packages/luigi/static/visualiser
links:
- luigid:luigid
- identity-provider:identity-provider
labels:
- "traefik.enable=true"
- "traefik.http.routers.app.rule=PathPrefix(`/luigi`,`/idp`,`/solr`,`/api`)"
- "traefik.http.routers.app.entrypoints=web"
- "traefik.http.middlewares.limit.buffering.maxRequestBodyBytes=10000000000"
- "traefik.http.routers.app.middlewares=limit"
networks:
- clarity
nlp-solr:
restart: always
container_name: NLP_SOLR
hostname: ${NLP_SOLR_HOSTNAME}
image: claritynlp/nlp-solr
expose:
- ${NLP_SOLR_CONTAINER_PORT}
volumes:
- nlp-solrdata:/opt/solr/server/solr/mycores
environment:
- SOLR_HEAP=${SOLR_HEAP}
networks:
- clarity
nlp-mongo:
container_name: NLP_MONGO
hostname: ${NLP_MONGO_HOSTNAME}
image: claritynlp/nlp-mongo
expose:
- ${NLP_MONGO_CONTAINER_PORT}
volumes:
- nlp-mongodata:/data/db
environment:
- MONGO_DATA_DIR=/data/db
- MONGO_LOG_DIR=/dev/null
- MONGO_INITDB_DATABASE=${NLP_MONGO_DATABASE}
- MONGO_INITDB_ROOT_USERNAME=${NLP_MONGO_USERNAME}
- MONGO_INITDB_ROOT_PASSWORD=${NLP_MONGO_PASSWORD}
networks:
- clarity
nlp-postgres:
container_name: NLP_POSTGRES
hostname: ${NLP_PG_HOSTNAME}
image: claritynlp/nlp-postgres
command: postgres -c 'shared_buffers=512MB' -c 'max_connections=500'
environment:
POSTGRES_USER: ${NLP_PG_USER}
POSTGRES_PASSWORD: ${NLP_PG_PASSWORD}
POSTGRES_DB: ${NLP_PG_DATABASE}
INIT_OMOP: ${INIT_OMOP}
expose:
- ${NLP_PG_CONTAINER_PORT}
volumes:
- nlp-pgdata:/var/lib/postgresql/data/
networks:
- clarity
ingest-api:
container_name: INGEST_API
hostname: ${INGEST_API_HOSTNAME}
image: claritynlp/ingest-api
volumes:
- /app/node_modules/ #empties container node_modules, forces bcrypt to be built on container
- ingest-files:/var/lib/ingest-files
expose:
- ${INGEST_API_CONTAINER_PORT}
entrypoint:
- /app/wait-for-it-extra.sh
- ${NLP_SOLR_HOSTNAME}:${NLP_SOLR_CONTAINER_PORT}
- ${REDIS_HOSTNAME}:${REDIS_CONTAINER_PORT}
- ${INGEST_MONGO_HOSTNAME}:${INGEST_MONGO_CONTAINER_PORT}
- ${NLP_API_HOSTNAME}:${NLP_API_CONTAINER_PORT}
- --timeout=420
- --
- pm2-runtime
command: app.js
environment:
- NODE_ENV=production
- JOB_TYPES=ingest
- NLP_SOLR_HOSTNAME=${NLP_SOLR_HOSTNAME}
- NLP_SOLR_CONTAINER_PORT=${NLP_SOLR_CONTAINER_PORT}
- NLP_CORE_NAME=${NLP_CORE_NAME}
- NLP_SOLR_URL_TOP_LEVEL=${NLP_SOLR_URL_TOP_LEVEL}
- NLP_API_HOSTNAME=${NLP_API_HOSTNAME}
- NLP_API_CONTAINER_PORT=${NLP_API_CONTAINER_PORT}
- INTERVAL=${INTERVAL}
- INGEST_MONGO_USERNAME=${INGEST_MONGO_USERNAME}
- INGEST_MONGO_PASSWORD=${INGEST_MONGO_PASSWORD}
- INGEST_MONGO_HOSTNAME=${INGEST_MONGO_HOSTNAME}
- INGEST_MONGO_CONTAINER_PORT=${INGEST_MONGO_CONTAINER_PORT}
- INGEST_MONGO_DATABASE=${INGEST_MONGO_DATABASE}
- INGEST_CLIENT_HOST_PORT=${INGEST_CLIENT_HOST_PORT}
- INGEST_API_LOG_LEVEL=${INGEST_API_LOG_LEVEL}
- REDIS_HOSTNAME=${REDIS_HOSTNAME}
- REDIS_CONTAINER_PORT=${REDIS_CONTAINER_PORT}
- PROTOCOL=http
- DASHBOARD_HOST=${HOST}
- INGEST_HOST=${HOST}
- ENTRYPOINT=${ENTRYPOINT_NON_SSL}
networks:
- clarity
depends_on:
- ingest-mongo
- redis
- nlp-solr
- nlp-api
labels:
- "traefik.enable=true"
- "traefik.http.routers.socket.rule=PathPrefix(`/socket.io`,`/__getcookie`)"
- "traefik.http.routers.socket.entrypoints=web"
ingest-mongo:
container_name: ${INGEST_MONGO_CONTAINER_NAME}
hostname: ${INGEST_MONGO_HOSTNAME}
image: claritynlp/ingest-mongo
environment:
- MONGO_DATA_DIR=/data/db
- MONGO_LOG_DIR=/dev/null
- MONGO_INITDB_DATABASE=${INGEST_MONGO_DATABASE}
- MONGO_INITDB_ROOT_USERNAME=${INGEST_MONGO_USERNAME}
- MONGO_INITDB_ROOT_PASSWORD=${INGEST_MONGO_PASSWORD}
expose:
- ${INGEST_MONGO_CONTAINER_PORT}
volumes:
- ingest-mongodata:/data/db
networks:
- clarity
redis:
container_name: REDIS
hostname: ${REDIS_HOSTNAME}
image: redis:4.0.10
expose:
- ${REDIS_CONTAINER_PORT}
volumes:
- redisdata:/data
networks:
- clarity
ingest-client:
container_name: INGEST_CLIENT
hostname: ${INGEST_CLIENT_HOSTNAME}
image: claritynlp/ingest-client
volumes:
- /app/node_modules
environment:
- PORT=${INGEST_CLIENT_CONTAINER_PORT}
- IDENTITY_PROVIDER_URL=${HOST}:${ENTRYPOINT_NON_SSL}/${IDP_PREFIX}
- API_HOST=${HOST}:${ENTRYPOINT_NON_SSL}/${IAAP_PREFIX}
- DASHBOARD_URL=${HOST}:${ENTRYPOINT_NON_SSL}/${DASHBOARD_PREFIX}
- RESULTS_URL=${HOST}:${ENTRYPOINT_NON_SSL}/${RESULTS_PREFIX}
- INGEST_URL=${HOST}:${ENTRYPOINT_NON_SSL}/${INGEST_PREFIX}
- SOCKET_URL=${HOST}:${ENTRYPOINT_NON_SSL}
labels:
- "traefik.enable=true"
- "traefik.port=${INGEST_CLIENT_CONTAINER_PORT}"
- "traefik.http.middlewares.ingest-stripprefix.stripprefix.prefixes=/${INGEST_PREFIX}"
- "traefik.http.routers.ingest.middlewares=ingest-stripprefix"
- "traefik.http.routers.ingest.rule=PathPrefix(`/${INGEST_PREFIX}`)"
- "traefik.http.routers.ingest.entrypoints=web"
networks:
- clarity
results-client:
container_name: RESULTS_CLIENT
hostname: ${RESULTS_CLIENT_HOSTNAME}
image: claritynlp/viewer-client
volumes:
- /app/node_modules
environment:
- PORT=${RESULTS_CLIENT_CONTAINER_PORT}
- IDENTITY_PROVIDER_URL=${HOST}:${ENTRYPOINT_NON_SSL}/${IDP_PREFIX}
- API_HOST=${HOST}:${ENTRYPOINT_NON_SSL}/${IAAP_PREFIX}
- DASHBOARD_URL=${HOST}:${ENTRYPOINT_NON_SSL}/${DASHBOARD_PREFIX}
- INGEST_URL=${HOST}:${ENTRYPOINT_NON_SSL}/${INGEST_PREFIX}
- RESULTS_URL=${HOST}:${ENTRYPOINT_NON_SSL}/${RESULTS_PREFIX}
- SOLR_URL=${HOST}:${ENTRYPOINT_NON_SSL}/${SOLR_PREFIX}
- LUIGI_URL=${HOST}:${ENTRYPOINT_NON_SSL}/${SCHEDULER_PREFIX}
labels:
- "traefik.enable=true"
- "traefik.port=${RESULTS_CLIENT_CONTAINER_PORT}"
- "traefik.http.middlewares.results-stripprefix.stripprefix.prefixes=/${RESULTS_PREFIX}"
- "traefik.http.routers.results.middlewares=results-stripprefix"
- "traefik.http.routers.results.rule=PathPrefix(`/${RESULTS_PREFIX}`)"
- "traefik.http.routers.results.entrypoints=web"
networks:
- clarity
dashboard-client:
container_name: DASHBOARD_CLIENT
hostname: ${DASHBOARD_CLIENT_HOSTNAME}
image: claritynlp/dashboard-client
volumes:
- /app/node_modules
environment:
- PORT=${DASHBOARD_CLIENT_CONTAINER_PORT}
- IDENTITY_PROVIDER_URL=${HOST}:${ENTRYPOINT_NON_SSL}/${IDP_PREFIX}
- API_HOST=${HOST}:${ENTRYPOINT_NON_SSL}/${IAAP_PREFIX}
- INGEST_URL=${HOST}:${ENTRYPOINT_NON_SSL}/${INGEST_PREFIX}
- RESULTS_URL=${HOST}:${ENTRYPOINT_NON_SSL}/${RESULTS_PREFIX}
- DASHBOARD_URL=${HOST}:${ENTRYPOINT_NON_SSL}/${DASHBOARD_PREFIX}
- SOCKET_URL=${HOST}:${ENTRYPOINT_NON_SSL}
- REACT_APP_DOCUMETATION_URL=https://claritynlp.readthedocs.io/en/latest/index.html
labels:
- "traefik.enable=true"
- "traefik.port=${DASHBOARD_CLIENT_CONTAINER_PORT}"
- "traefik.http.middlewares.dashboard-stripprefix.stripprefix.prefixes=/${DASHBOARD_PREFIX}"
- "traefik.http.routers.dashboard.middlewares=dashboard-stripprefix"
- "traefik.http.routers.dashboard.rule=PathPrefix(`/${DASHBOARD_PREFIX}`)"
- "traefik.http.routers.dashboard.entrypoints=web"
networks:
- clarity
traefik:
image: "traefik:v2.1.2"
container_name: "traefik"
command:
- "--log.level=INFO"
- "--api=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
ports:
- "${ENTRYPOINT_NON_SSL}:80"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
networks:
- clarity