-
Notifications
You must be signed in to change notification settings - Fork 39
/
docker-compose.yml
325 lines (325 loc) · 10.3 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
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
version: '3'
services:
postgres:
image: postgres:9.6
container_name: postgres
networks:
- devnet
volumes:
- psqldata:/var/lib/postgresql/data
- ./scripts/postgres_init.sql:/docker-entrypoint-initdb.d/postgres_init.sql:ro
- ./scripts/postgres_always.sh:/postgres_always.sh:ro
- ./scripts/postgres_run.sh:/usr/local/bin/postgres_run.sh:ro
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "psql -U fence_user -d fence_db -c 'SELECT 1;'"]
interval: 60s
timeout: 5s
retries: 3
command: postgres_run.sh
environment:
- POSTGRES_PASSWORD=postgres
indexd-service:
image: "quay.io/cdis/indexd:2021.03"
command: bash indexd_setup.sh
container_name: indexd-service
networks:
- devnet
volumes:
- ./Secrets/indexd_settings.py:/var/www/indexd/local_settings.py
- ./Secrets/indexd_creds.json:/var/www/indexd/creds.json
- ./Secrets/config_helper.py:/var/www/indexd/config_helper.py
- ./scripts/indexd_setup.sh:/var/www/indexd/indexd_setup.sh
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost/_status"]
interval: 60s
timeout: 5s
retries: 3
depends_on:
- postgres
fence-service:
image: "quay.io/cdis/fence:2021.03"
command: bash /var/www/fence/fence_setup.sh
container_name: fence-service
networks:
- devnet
volumes:
- ./Secrets/fence-config.yaml:/var/www/fence/fence-config.yaml
- ./Secrets/user.yaml:/var/www/fence/user.yaml
- ./Secrets/TLS/service.crt:/usr/local/share/ca-certificates/cdis-ca.crt
- ./Secrets/fenceJwtKeys:/fence/keys
- ./scripts/fence_setup.sh:/var/www/fence/fence_setup.sh
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost/_status"]
interval: 60s
timeout: 5s
retries: 3
environment:
- PYTHONPATH=/var/www/fence
- GEN3_DEBUG=True
depends_on:
- postgres
- arborist-service
arborist-service:
image: "quay.io/cdis/arborist:2021.03"
container_name: arborist-service
entrypoint: bash /go/src/github.com/uc-cdis/arborist/arborist_setup.sh
networks:
- devnet
volumes:
- ./scripts/arborist_setup.sh:/go/src/github.com/uc-cdis/arborist/arborist_setup.sh
environment:
- JWKS_ENDPOINT=http://fence-service/.well-known/jwks
- PGDATABASE=arborist_db
- PGUSER=arborist_user
- PGPASSWORD=arborist_pass
- PGHOST=postgres
- PGPORT=5432
- PGSSLMODE=disable
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost/health"]
interval: 60s
timeout: 5s
retries: 10
depends_on:
- postgres
metadata-service:
image: "quay.io/cdis/metadata-service:2021.03"
container_name: metadata-service
depends_on:
- postgres
environment:
- DB_HOST=postgres
- DB_USER=metadata_user
- DB_PASSWORD=metadata_pass
- DB_DATABASE=metadata
command: >
sh -c "/env/bin/alembic upgrade head && /env/bin/uvicorn --host 0.0.0.0 --port 80 mds.asgi:app --reload"
networks:
- devnet
peregrine-service:
image: "quay.io/cdis/peregrine:2021.03"
container_name: peregrine-service
networks:
- devnet
volumes:
- ./Secrets/peregrine_settings.py:/var/www/peregrine/wsgi.py
- ./Secrets/peregrine_creds.json:/var/www/peregrine/creds.json
- ./Secrets/config_helper.py:/var/www/peregrine/config_helper.py
- ./Secrets/TLS/service.crt:/usr/local/share/ca-certificates/cdis-ca.crt
- ./scripts/peregrine_setup.sh:/peregrine_setup.sh
- ./datadictionary/gdcdictionary/schemas:/schemas_dir
environment: &env
DICTIONARY_URL: https://s3.amazonaws.com/dictionary-artifacts/datadictionary/develop/schema.json
# PATH_TO_SCHEMA_DIR: /schemas_dir
REQUESTS_CA_BUNDLE: /etc/ssl/certs/ca-certificates.crt
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost/_status"]
interval: 60s
timeout: 5s
# give peregrine some extra time to startup
retries: 10
depends_on:
- postgres
- sheepdog-service
sheepdog-service:
image: "quay.io/cdis/sheepdog:2021.03"
command: bash /sheepdog_setup.sh
container_name: sheepdog-service
networks:
- devnet
volumes:
- ./Secrets/sheepdog_settings.py:/var/www/sheepdog/wsgi.py
- ./Secrets/sheepdog_creds.json:/var/www/sheepdog/creds.json
- ./Secrets/config_helper.py:/var/www/sheepdog/config_helper.py
- ./scripts/sheepdog_setup.sh:/sheepdog_setup.sh
- ./datadictionary/gdcdictionary/schemas:/schemas_dir
environment: *env
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost/_status"]
interval: 60s
timeout: 5s
retries: 5
depends_on:
- postgres
guppy-service:
image: "quay.io/cdis/guppy:2021.03"
container_name: guppy-service
networks:
- devnet
volumes:
- ./Secrets/guppy_config.json:/guppy/guppy_config.json
- ./scripts/wait_for_esproxy.sh:/usr/bin/wait_for_esproxy.sh:ro
entrypoint: /usr/bin/wait_for_esproxy.sh
command: node --max-http-header-size 16000 dist/server/server.js
environment:
- GUPPY_CONFIG_FILEPATH=/guppy/guppy_config.json
- GEN3_ARBORIST_ENDPOINT=http://arborist-service
- GEN3_ES_ENDPOINT=http://esproxy-service:9200
depends_on:
- arborist-service
- esproxy-service
esproxy-service:
image: quay.io/cdis/elasticsearch-oss:6.8.12
container_name: esproxy-service
environment:
- cluster.name=elasticsearch-cluster
- bootstrap.memory_lock=false
- "ES_JAVA_OPTS=-Xms1g -Xmx1g"
entrypoint:
- /bin/bash
# mmapfs requires systemctl update - see https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules-store.html#mmapfs
command:
- -c
- "echo -e 'cluster.name: docker-cluster\nhttp.host: 0.0.0.0\nindex.store.type: niofs' > /usr/share/elasticsearch/config/elasticsearch.yml && /usr/local/bin/docker-entrypoint.sh eswrapper"
volumes:
- ./scripts/wait_for_esproxy.sh:/usr/bin/wait_for_esproxy.sh:ro
- esdata:/usr/share/elasticsearch/data
healthcheck:
test: ["CMD-SHELL", "wait_for_esproxy.sh"]
interval: 60s
timeout: 5s
# give peregrine some extra time to startup
retries: 10
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
ports:
- 9200:9200
- 9300:9300
networks:
- devnet
pidgin-service:
image: "quay.io/cdis/pidgin:2021.03"
container_name: pidgin-service
networks:
- devnet
volumes:
- ./scripts/waitForContainers.sh:/var/www/data-portal/waitForContainers.sh
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost/_status"]
interval: 60s
timeout: 5s
retries: 3
depends_on:
- peregrine-service
portal-service:
image: "quay.io/cdis/data-portal:2021.03"
container_name: portal-service
command: ["bash", "/var/www/data-portal/waitForContainers.sh"]
networks:
- devnet
volumes:
- ./scripts/waitForContainers.sh:/var/www/data-portal/waitForContainers.sh
- ./Secrets/gitops.json:/data-portal/data/config/gitops.json
- ./Secrets/gitops-logo.png:/data-portal/custom/logo/gitops-logo.png
- ./Secrets/gitops.png:/data-portal/custom/createdby/gitops.png
environment:
- NODE_ENV=dev
#- MOCK_STORE=true
- APP=gitops
- GDC_SUBPATH=http://revproxy-service/api/v0/submission/
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost"]
interval: 60s
timeout: 5s
retries: 10
depends_on:
- postgres
- peregrine-service
- sheepdog-service
jupyter-service:
image: "quay.io/cdis/jupyter-slim:latest"
container_name: jupyter-service
entrypoint:
- "start-notebook.sh"
command:
- "--NotebookApp.base_url=/lw-workspace/proxy"
- "--NotebookApp.password=''"
- "--NotebookApp.token=''"
networks:
- devnet
environment:
- FRAME_ANCESTORS=http://localhost
revproxy-service:
image: "quay.io/cdis/nginx:2021.03"
container_name: revproxy-service
networks:
- devnet
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- ./Secrets/TLS/service.crt:/etc/nginx/ssl/nginx.crt
- ./Secrets/TLS/service.key:/etc/nginx/ssl/nginx.key
ports:
- "80:80"
- "443:443"
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost/_status"]
interval: 60s
timeout: 5s
retries: 3
depends_on:
- arborist-service
- indexd-service
- peregrine-service
- sheepdog-service
- fence-service
- portal-service
- pidgin-service
tube-service:
image: "quay.io/cdis/tube:2021.03"
container_name: tube-service
command: bash -c "while true; do sleep 5; done"
networks:
- devnet
environment:
- DICTIONARY_URL=https://s3.amazonaws.com/dictionary-artifacts/datadictionary/develop/schema.json
- ES_URL=esproxy-service
- ES_INDEX_NAME=etl
- HADOOP_URL=hdfs://spark-service:9000
- HADOOP_HOST=spark-service
volumes:
- ./Secrets/etl_creds.json:/usr/share/gen3/tube/creds.json
- ./Secrets/etlMapping.yaml:/usr/share/gen3/tube/etlMapping.yaml
- ./Secrets/user.yaml:/usr/share/gen3/tube/user.yaml
- ./datadictionary:/tmp/datadictionary
depends_on:
- postgres
- esproxy-service
- spark-service
spark-service:
image: "quay.io/cdis/gen3-spark:2021.03"
container_name: spark-service
command: bash -c "python run_config.py && hdfs namenode -format && hdfs --daemon start namenode && hdfs --daemon start datanode && yarn --daemon start resourcemanager && yarn --daemon start nodemanager && hdfs dfsadmin -safemode leave && hdfs dfs -mkdir /result && while true; do sleep 5; done"
expose:
- 22
- 8030
- 8031
- 8032
- 9000
networks:
- devnet
environment:
- HADOOP_URL=hdfs://0.0.0.0:9000
- HADOOP_HOST=0.0.0.0
kibana-service:
image: quay.io/cdis/kibana-oss:6.5.4
container_name: kibana-service
environment:
- SERVER_NAME=kibana-service
- ELASTICSEARCH_URL=http://esproxy-service:9200
ports:
- 5601:5601
networks:
- devnet
depends_on:
- esproxy-service
networks:
devnet:
volumes:
psqldata:
esdata: