-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
142 lines (130 loc) · 4.13 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: "3.8"
services:
db:
build: ./postgres/
shm_size: 1g
environment:
- POSTGRES_PASSWORD=isamplesinabox
- POSTGRES_USER=isb_writer
- POSTGRES_DB=isb_1
volumes:
- pg_data:/var/lib/postgresql/data
ports:
- "${PG_PORT}:5432"
# Use the custom config that we copy over in our Dockerfile build
command: postgres -c config_file=/etc/postgresql.conf
db_exporter:
image: quay.io/prometheuscommunity/postgres-exporter
environment:
- DATA_SOURCE_NAME=postgresql://isb_writer:isamplesinabox@db:5432/postgres?sslmode=disable
ports:
- "0.0.0.0:9187:9187"
depends_on:
- db
profiles: [isamples_central]
solr:
build: ./solr/
volumes:
- solr_data:/var/solr
ports:
- "${SOLR_PORT}:8983"
expose:
- "9983"
command: solr -f -cloud
environment:
- SOLR_HEAP=8192m
- SOLR_MODULES=sql
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:8983/solr/isb_core_records/admin/ping?wt=json | grep -i \"ok\" || exit 1"]
start_period: 15s
interval: 10s
timeout: 5s
retries: 3
solr_exporter:
build: ./solr/
command: solr-exporter
environment:
- ZK_HOST=solr:9983
ports:
- "0.0.0.0:8989:8989"
depends_on:
solr:
condition: service_healthy
profiles: [isamples_central]
node_exporter:
image: quay.io/prometheus/node-exporter:latest
container_name: node_exporter
command:
- '--path.rootfs=/host'
network_mode: host
pid: host
restart: unless-stopped
volumes:
- '/:/host:ro,rslave'
ports:
- "0.0.0.0:9100:9100"
profiles: [isamples_central]
isamples_inabox:
build:
context: ./isb/
args:
CRONTAB_FILE: ${CRONTAB_FILE}
ENV_FILE: ${ENV_FILE}
ISB_SITEMAP_PREFIX: https://${ISB_HOST}${UVICORN_ROOT_PATH}
ANALYTICS_DOMAIN: ${ANALYTICS_DOMAIN}
ANALYTICS_SRC: ${ANALYTICS_SRC}
DATACITE_PREFIX: ${DATACITE_PREFIX}
DATACITE_PUBLISHER: ${DATACITE_PUBLISHER}
ports:
# In the Docker network, start on 8000 and map that to the external port specified in the environment file
- "${ISB_PORT}:8000"
depends_on:
- solr
- db
environment:
- ISB_UVICORN_ROOT_PATH=${UVICORN_ROOT_PATH}
- ISB_SITEMAP_PREFIX=https://${ISB_HOST}${UVICORN_ROOT_PATH}
volumes:
- sitemaps_data:/app/sitemaps
- metadata_models:/app/metadata_models
secrets:
- orcid_client_id
- orcid_client_secret
- datacite_username
- datacite_password
- hypothesis_jwt_client_id
- hypothesis_jwt_client_secret
- orcid_token_secret
- orcid_superusers
solr_schema_init:
build: ./isb/
depends_on:
- isamples_inabox
- solr
command: python solr_schema_init/create_isb_core_schema.py
volumes:
pg_data:
name: ${PG_VOLUME_NAME}
solr_data:
name: ${SOLR_VOLUME_NAME}
sitemaps_data:
name: ${SITEMAPS_VOLUME_NAME}
metadata_models:
name: metadata_models
secrets:
orcid_client_id:
file: ./secrets/orcid_client_id
orcid_client_secret:
file: ./secrets/orcid_client_secret
datacite_username:
file: ./secrets/datacite_username
datacite_password:
file: ./secrets/datacite_password
hypothesis_jwt_client_id:
file: ./secrets/hypothesis_jwt_client_id
hypothesis_jwt_client_secret:
file: ./secrets/hypothesis_jwt_client_secret
orcid_token_secret:
file: ./secrets/orcid_token_secret
orcid_superusers:
file: ./secrets/orcid_superusers