forked from ESGF/esgf-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
225 lines (209 loc) · 5.85 KB
/
docker-compose.yml
File metadata and controls
225 lines (209 loc) · 5.85 KB
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
# Docker Compose file to start a full ESGF node.
#
# Required env variables:
#
# ESGF_CONFIG : points to the root ESGF configuration directory
# example: export ESGF_CONFIG=/Users/cinquini/ESGF_CONFIG
# ESGF_HOSTNAME: HostName or IP address for apache httpd front-end server
# example: export ESGF_HOSTNAME=my.esgf.node
# example: export ESGF_HOSTNAME=`docker-machine ip`
# ESGF_VERSION: version of ESGF/Docker distribution
# example: export ESGF_VERSION=1.0
# ESGF_DATA_DIR: root of ESGF data directories
version: '2.1'
networks:
# network to keep postgres database isolated
dbnetwork:
services:
# data container holding site-specific ESGF configuration
# this container stops after the volumes are initialized
# only include configuration common to more than one container
esgf-config:
image: centos:6
container_name: esgf-config
volumes:
- $ESGF_CONFIG/httpd/certs/:/etc/certs/
- $ESGF_CONFIG/httpd/conf/esgf-httpd.conf:/etc/httpd/conf.d/esgf-httpd.conf
- $ESGF_CONFIG/grid-security/certificates/:/etc/grid-security/certificates/
- $ESGF_CONFIG/esg/config/:/esg/config/
- $ESGF_CONFIG/esg/config/tomcat/esg-truststore.ts:/usr/java/latest/jre/lib/security/jssecacerts
# ESGF postgres database
esgf-postgres:
image: esgfhub/esgf-postgres:${ESGF_VERSION}
expose:
- "5432"
ports:
- "5432:5432"
container_name: postgres
networks:
- dbnetwork
volumes:
- pg_data:/var/lib/pgsql/data
# ESGF Data Node
esgf-data-node:
image: esgfhub/esgf-data-node:${ESGF_VERSION}
container_name: data-node
expose:
- "8080"
- "8443"
ports:
- "8080:8080"
- "8443:8443"
networks:
- default
- dbnetwork
volumes:
- tds_data:/esg/content/thredds
- $ESGF_CONFIG/webapps/thredds/WEB-INF/web.xml:/usr/local/tomcat/webapps/thredds/WEB-INF/web.xml
- $ESGF_DATA_DIR:/esg/data
#- $ESGF_CONFIG/grid-security/certificates/:/etc/grid-security/certificates/
#- $ESGF_CONFIG/globus/certificate-file:/root/.globus/certificate-file
volumes_from:
- esgf-config
environment:
- ESGF_HOSTNAME
depends_on:
- esgf-postgres
# ESGF Identity Provider
esgf-idp-node:
image: esgfhub/esgf-idp-node:${ESGF_VERSION}
container_name: idp-node
expose:
- "8080"
- "8443"
ports:
- "8082:8080"
- "8445:8443"
networks:
- default
- dbnetwork
volumes_from:
- esgf-config
depends_on:
- esgf-postgres
# Solr engine running within Jetty
esgf-solr:
image: esgfhub/esgf-solr:${ESGF_VERSION}
container_name: solr
expose:
- "8983"
- "8984"
ports:
- "8983:8983"
- "8984:8984"
volumes:
- solr_data:/esg/solr-index
volumes_from:
- esgf-config
networks:
- default
# ESGF Index Node
# note the non-standard ports used on the host
# (since the standard ports are used by the data-node service)
esgf-index-node:
image: esgfhub/esgf-index-node:${ESGF_VERSION}
container_name: index-node
expose:
- "8080"
- "8443"
ports:
- "8081:8080"
- "8444:8443"
depends_on:
- esgf-solr
volumes_from:
- esgf-config
networks:
- default
# CoG
# data container to hold CoG source code and python virtual environment
# this container stops after the volume 'cog_data' is initialized
esgf-cog:
image: esgfhub/esgf-cog:${ESGF_VERSION}
container_name: cog
expose:
- "8000"
ports:
- "8000:8000"
volumes:
- cog_data:/usr/local/cog/cog_config
volumes_from:
- esgf-config
#command: $ESGF_HOSTNAME true true # ESGF=true, keep django server runnining on port 8000
command: $ESGF_HOSTNAME true false # ESGF=false, django server running on port 8000 = false
depends_on:
- esgf-postgres
networks:
- dbnetwork
environment:
- COG_DIR=/usr/local/cog
- COG_INSTALL_DIR=/usr/local/cog/cog_install
- COG_CONFIG_DIR=/usr/local/cog/cog_config
- ESGF_HOSTNAME
# flag to execute CoG initialization, defaults to true, may be overridden from shell environment before starting docker-compose
- ${INIT:-true}
esgf-httpd:
image: esgfhub/esgf-httpd:${ESGF_VERSION}
container_name: httpd
entrypoint: /usr/local/bin/docker-entrypoint.sh
volumes:
- cog_data:/usr/local/cog/cog_config
volumes_from:
- esgf-config
- esgf-cog
# - esgf-node-manager
environment:
- SSL_CERT_DIR=/etc/grid-security/certificates
- COG_CONFIG_DIR=/usr/local/cog/cog_config
- ESGF_HOSTNAME
ports:
- "80:80"
- "443:443"
depends_on:
- esgf-cog
# - esgf-node-manager
healthcheck:
test: 'curl --fail "https://${ESGF_HOSTNAME}/" || exit 1'
# httpd URLs must use hostname=$ESGF_HOSTNAME
networks:
default:
aliases:
- "${ESGF_HOSTNAME}"
dbnetwork: {}
esgf-node-manager:
image: esgfhub/esgf-node-manager:${ESGF_VERSION}
container_name: node-manager
volumes_from:
- esgf-config
environment:
- SSL_CERT_DIR=/etc/grid-security/certificates
- ESGF_HOSTNAME
depends_on:
- esgf-postgres
networks:
default: {}
dbnetwork: {}
# FTP server
#esgf-ftp:
# image: esgfhub/esgf-vsftp:${ESGF_VERSION}
# container_name: ftp
# ports:
# - "20:20"
# - "21:21"
# - "12020-12025:12020-12025"
# networks:
# - default
# volumes:
# - $ESGF_DATA_DIR:/var/ftp/pub
# use Docker volumes to store persistent data
# (which survives when the containers are removed)
volumes:
# postgres data and configuration
pg_data:
# cog data directory
cog_data:
# contains Solr index data
solr_data:
# contains TDS configuration, catalogs, cache, and logs
# (directory below -Dtds.content.root.path=/esg/content)
tds_data: