-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
296 lines (279 loc) · 8.54 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
version: "3.7"
services:
db:
image: postgres:11
restart: always
environment:
POSTGRES_USER: ${PSQL_USERNAME}
POSTGRES_PASSWORD: ${PSQL_PASSWORD}
POSTGRES_DB: ${PSQL_DATABASE}
POSTGRES_PORT: ${PSQL_PORT}
TZ: 'America/Los_Angeles'
PGTZ: 'America/Los_Angeles'
ports:
- "${PSQL_PORT}:${PSQL_PORT}"
command: postgres -c config_file=/etc/postgresql.conf -c hba_file=/etc/pg_hba.conf
volumes:
- "./db/postgresql.conf:/etc/postgresql.conf"
- "./db/pg_hba.conf:/etc/pg_hba.conf"
- curation_db_storage:/var/lib/postgresql/data/
- "${CALTECH_CURATION_FILES_EXTERNAL_PATH}:${CALTECH_CURATION_FILES_INTERNAL_PATH}"
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U ${PSQL_USERNAME}" ]
interval: 10s
timeout: 5s
retries: 5
networks:
- caltech-curation-network
hostname: curation_db
postgres_prom_exporter:
restart: unless-stopped
image: wrouesnel/postgres_exporter
environment:
DATA_SOURCE_URI: curation_db:${PSQL_PORT}?sslmode=disable
DATA_SOURCE_USER: ${PSQL_USERNAME}
DATA_SOURCE_PASS: ${PSQL_PASSWORD}
TZ: 'America/Los_Angeles'
depends_on:
- db
networks:
- caltech-curation-network
hostname: postgres_prom_exporter
prometheus:
restart: unless-stopped
image: prom/prometheus
volumes:
- "./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml"
- "./prometheus/rules.yml:/etc/prometheus/rules.yml"
- "${VOLUMES_DIR}/prometheus:/prometheus"
depends_on:
- postgres_prom_exporter
# - grok_exporter_email_extr
# - grok_exporter_expression_cluster
# - grok_exporter_antibody
# - grok_exporter_vfp
# - grok_exporter_afp
# - grok_exporter_afp_reminders
# - grok_exporter_afp_digests
networks:
- caltech-curation-network
environment:
TZ: 'America/Los_Angeles'
hostname: prometheus
alertmanager:
container_name: alert_manager
restart: unless-stopped
image: prom/alertmanager
#ports:
# - "9093:9093"
volumes:
- ./prometheus/alertmanager.yml:/etc/alertmanager/alertmanager.yml
networks:
- caltech-curation-network
hostname: alertmanager
grafana:
image: grafana/grafana
restart: unless-stopped
ports:
- "${GRAFANA_PORT}:3000"
volumes:
- "${VOLUMES_DIR}/grafana:/var/lib/grafana"
- ./grafana/grafana.ini:/etc/grafana/grafana.ini
depends_on:
- db
- prometheus
networks:
- caltech-curation-network
environment:
GF_SERVER_ROOT_URL: "https://${HOST_NAME}/grafana"
TZ: 'America/Los_Angeles'
jenkins:
image: jenkins/jenkins:lts
restart: always
privileged: true
user: root
ports:
- 49001:8080
- 50000:50000
container_name: jenkins
volumes:
- "${VOLUMES_DIR}/jenkins:/var/jenkins_home"
- /var/run/docker.sock:/var/run/docker.sock
- /usr/bin/docker:/usr/bin/docker
curation:
restart: unless-stopped
build:
context: .
dockerfile: curation/Dockerfile
args:
SSH_ACEDB_PASSWORD: "${SSH_ACEDB_PASSWORD}"
SSH_CITACE_PASSWORD: "${SSH_CITACE_PASSWORD}"
CALTECH_CURATION_FILES_INTERNAL_PATH: "${CALTECH_CURATION_FILES_INTERNAL_PATH}"
devices:
- /dev/fuse:/dev/fuse:rwm
cap_add:
- SYS_ADMIN
security_opt:
- apparmor:unconfined
environment:
CALTECH_CURATION_FILES_INTERNAL_PATH: "${CALTECH_CURATION_FILES_INTERNAL_PATH}"
HOST_NAME: "${HOST_NAME}"
SSL_PORT: "${SSL_PORT}"
RESTIC_REPOSITORY: "${RESTIC_REPO}"
AWS_ACCESS_KEY_ID: "${AWS_ACCESS_KEY_ID_RESTIC}"
AWS_SECRET_ACCESS_KEY: "${AWS_SECRET_ACCESS_KEY_RESTIC}"
RESTIC_PASSWORD: "${RESTIC_PASSWORD}"
OKTA_DOMAIN: "${OKTA_DOMAIN}"
OKTA_API_AUDIENCE: "${OKTA_API_AUDIENCE}"
OKTA_CLIENT_ID: "${OKTA_CLIENT_ID}"
OKTA_CLIENT_SECRET: "${OKTA_CLIENT_SECRET}"
API_PORT: "${AGR_ABC_API_PORT}"
API_SERVER: "${AGR_ABC_API_SERVER}"
ENV_STATE: "${ENV_STATE}"
ports:
- "${CURATION_FORMS_PORT}:80"
- "${SSH_PORT}:22"
volumes:
- "${HTTPD_AUTH_FILE_PATH}:/etc/httpd/passwd/passwords"
- "${SRC_DIR_PATH}/curation/website/pub:/usr/lib/pub/"
- "${SRC_DIR_PATH}/curation/website/priv:/usr/lib/priv/"
- "${SRC_DIR_PATH}/curation/scripts/:/usr/lib/scripts/"
- "${SRC_DIR_PATH}/curation/user_files/:/usr/lib/user_files/"
- "${ENV_FILE_PATH}:/usr/lib/.env"
- "${SRC_DIR_PATH}/curation/crontab:/etc/cron.d/curation_crontab"
- "${SSL_CERTIFICATE_DIR}:/etc/ssl_certificate"
- "${CALTECH_CURATION_FILES_EXTERNAL_PATH}:${CALTECH_CURATION_FILES_INTERNAL_PATH}"
- "${VOLUMES_DIR}:/usr/caltech_volumes"
networks:
- caltech-curation-network
depends_on:
- reverse_proxy
- db
hostname: curation
acedb:
# run 'xhost +local:root' on the host to give the right permissions to the instance
build:
context: acedb
dockerfile: Dockerfile
args:
CALTECH_CURATION_FILES_INTERNAL_PATH: "${CALTECH_CURATION_FILES_INTERNAL_PATH}"
environment:
- DISPLAY=${DISPLAY}
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix
- "${CALTECH_CURATION_FILES_EXTERNAL_PATH}:${CALTECH_CURATION_FILES_INTERNAL_PATH}"
network_mode: host
grok_exporter_email_extr:
restart: unless-stopped
container_name: grok_exporter_email_extr
image: grok_exporter
build: prometheus/grok_exporter/
#ports:
# - "9144:9144"
volumes:
- ./prometheus/grok_exporter/config_email_extr.yml:/grok/config.yml
- /var/log/:/grok/log/
networks:
- caltech-curation-network
hostname: grok_exporter_email_extr
grok_exporter_expression_cluster:
restart: unless-stopped
container_name: grok_exporter_expression_cluster
image: grok_exporter
build: prometheus/grok_exporter/
#ports:
# - "9144:9144"
volumes:
- ./prometheus/grok_exporter/config_expr_cluster.yml:/grok/config.yml
- /var/log/:/grok/log/
networks:
- caltech-curation-network
hostname: grok_exporter_expr_cluster
grok_exporter_antibody:
restart: unless-stopped
container_name: grok_exporter_antibody
image: grok_exporter
build: prometheus/grok_exporter/
#ports:
# - "9144:9144"
volumes:
- ./prometheus/grok_exporter/config_antibody.yml:/grok/config.yml
- /var/log/:/grok/log/
networks:
- caltech-curation-network
hostname: grok_exporter_antibody
grok_exporter_afp:
restart: unless-stopped
container_name: grok_exporter_afp
image: grok_exporter
build: prometheus/grok_exporter/
#ports:
# - "9145:9144"
volumes:
- ./prometheus/grok_exporter/config_afp.yml:/grok/config.yml
- /var/log/:/grok/log/
networks:
- caltech-curation-network
hostname: grok_exporter_afp
grok_exporter_afp_reminders:
restart: unless-stopped
container_name: grok_exporter_afp_reminders
image: grok_exporter
build: ./prometheus/grok_exporter/
#ports:
# - "9147:9144"
volumes:
- ./prometheus/grok_exporter/config_afp_reminders.yml:/grok/config.yml
- /var/log/:/grok/log/
networks:
- caltech-curation-network
hostname: grok_exporter_afp_reminders
grok_exporter_afp_digests:
restart: unless-stopped
container_name: grok_exporter_afp_digests
image: grok_exporter
build: ./prometheus/grok_exporter/
#ports:
# - "9148:9144"
volumes:
- ./prometheus/grok_exporter/config_afp_weekly_digests.yml:/grok/config.yml
- /var/log/:/grok/log/
networks:
- caltech-curation-network
hostname: grok_exporter_afp_digests
grok_exporter_vfp:
restart: unless-stopped
container_name: grok_exporter_vfp
image: grok_exporter
build: ./prometheus/grok_exporter/
#ports:
# - "9146:9144"
volumes:
- ./prometheus/grok_exporter/config_vfp.yml:/grok/config.yml
- /var/log/:/grok/log/
networks:
- caltech-curation-network
hostname: grok_exporter_vfp
reverse_proxy:
build:
context: .
dockerfile: reverse_proxy/Dockerfile
restart: unless-stopped
container_name: reverse_proxy
volumes:
- "${VOLUMES_DIR}/certbot/conf/:/etc/letsencrypt"
- "${VOLUMES_DIR}/certbot/www/:/var/www/html/"
networks:
- caltech-curation-network
hostname: reverse_proxy
ports:
- "443:443"
- "80:80"
environment:
ENV_STATE: "${ENV_STATE}"
networks:
caltech-curation-network:
name: caltech-curation-network
volumes:
grafana_storage:
curation_db_storage: