forked from AlabamaWaterInstitute/tethysportal-ciroh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
323 lines (309 loc) · 9.35 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
# before starting the docker compose create the following:
# sudo mkdir -p <root_level>/data/tethys/thredds_data/tethys/ggst_thredds_directory
# if needed to build new image
# docker compose --compatibility up -d --build
# if do not need to build new image
# docker compose --compatibility up -d
version: '3.8'
services:
db:
image: postgis/postgis:15-3.3
restart: always
networks:
- 'internal'
ports:
- '5432:5432'
env_file:
- ./env/db.env
volumes:
- postgresql_config_tethys_data:/var/lib/postgresql/data
thredds:
# image: tethysplatformuploader/thredds-docker:4.6.20-SNAPSHOT
image: unidata/thredds-docker:5.4
restart: always
networks:
- 'internal'
- 'external'
ports:
- '8080:8080'
env_file:
- ./env/thredds.env
volumes:
- thredds_tomcat_local_content:/usr/local/tomcat
- tomcat_logs:/usr/local/tomcat/logs/
- thredds_logs:/usr/local/tomcat/content/thredds/logs/
- type: bind
source: ./data/tethys/thredds_data/
target: /usr/local/tomcat/content/thredds/public/thredds_data
- type: bind
source: ./config/thredds/tomcat-users.xml
target: /usr/local/tomcat/conf/tomcat-users.xml
- type: bind
source: ./config/thredds/catalog.xml
target: /usr/local/tomcat/content/thredds/catalog.xml
- type: bind
source: ./config/thredds/threddsConfig.xml
target: /usr/local/tomcat/content/thredds/threddsConfig.xml
redis:
image: redis:latest
restart: always
networks:
- 'external'
ports:
- '6379:6379'
web:
image: tethys-portal-docker:latest
build:
context: .
dockerfile: Dockerfile
restart: always
depends_on:
- 'db'
- 'thredds'
- 'redis'
networks:
- 'internal'
- 'external'
ports:
- '80:80'
env_file:
- ./env/web.env
volumes:
- tethys_persist:/var/lib/tethys_persist
- tethys_logs:/var/log/tethys
- type: bind
source: ./data/tethys/thredds_data
target: /var/lib/tethys_persist/thredds_data
rabbitmq:
image: rabbitmq:3.9-management
user: 1000:1000 # set the userid:groupid the container runs as
restart: always
volumes:
- rabbitmq_data:/var/lib/rabbitmq
networks:
- external
deploy:
resources:
limits:
cpus: '2.0'
memory: 1G
database:
# be sure geoserver.backend.jdbcconfig.initdb is set to true in application.yml at lease for the first app run
image: postgres:13-alpine
environment:
POSTGRES_DB: geoserver_config
POSTGRES_USER: geoserver
POSTGRES_PASSWORD: geo5erver
networks:
- 'external'
- 'internal'
volumes:
- postgresql_config_data:/var/lib/postgresql/data
deploy:
resources:
limits:
cpus: '2.0'
memory: 1G
# Eureka service discovery. This is a Discovery First Bootstrap configuration.
# The discovery service is the only fixed entry point.
# Browse to http://localhost:8761 to check all services are registered.
# Run docker-compose -f docker-compose.yml -f docker-compose-discovery-ha.yml to run extra discovery service instances for HA
discovery:
image: geoservercloud/geoserver-cloud-discovery:1.5.0
user: 1000:1000 # set the userid:groupid the container runs as
ports:
- 8761:8761
networks:
- 'external'
- 'internal'
restart: always
deploy:
resources:
limits:
cpus: '2.0'
memory: 512M
# Spring Cloud Config service, provides centralized configuration to all
# microservices. Being a Discovery First Bootstrap configuration, it'll
# register itself with the Eureka discovery service and can be scaled
config:
image: geoservercloud/geoserver-cloud-config:1.5.0
user: 1000:1000 # set the userid:groupid the container runs as
depends_on:
- discovery
- rabbitmq
- database
environment:
# Either 'git' or 'native'. Use the default sample git repository to download the services configuration from
# If 'git', BEWARE config server will look for a branch called "master", and github changed the default branch name to "main"
# For more information, see https://cloud.spring.io/spring-cloud-config/multi/multi__spring_cloud_config_server.html#_git_backend
SPRING_PROFILES_ACTIVE: git
# 'git' profile config
CONFIG_GIT_URI: https://github.com/geoserver/geoserver-cloud-config.git
# get the config for this release from the v1.5.0 tag
SPRING_CLOUD_CONFIG_SERVER_GIT_DEFAULT_LABEL: v1.5.0
# where to store the cloned repository, if unset, it'll use /tmp/config-repo-<randomid>
CONFIG_GIT_BASEDIR: /tmp/git_config
# 'native' profile config
CONFIG_NATIVE_PATH: /tmp/config
# avoid stack trace due to jgit not being able of creating a .config dir at $HOME
XDG_CONFIG_HOME: /tmp
networks:
- 'external'
- 'internal'
# Uncoment to bind to a local filesystem directory if using the 'native' profile
#volumes:
# - ./config:/tmp/config
deploy:
resources:
limits:
cpus: '2.0'
memory: 512M
admin:
image: geoservercloud/geoserver-cloud-admin-server:1.5.0
user: 1000:1000 # set the userid:groupid the container runs as
depends_on:
- config
ports:
- 9091:8080
networks:
- 'external'
- 'internal'
deploy:
resources:
limits:
cpus: '2.0'
memory: 1G
# Application facade, provides a single entry point routing to all
# microservices (e.g. http://localhost:9090/geoserver/wms, http://localhost:9090/geoserver/wfs, etc)
gateway:
image: geoservercloud/geoserver-cloud-gateway:1.5.0
user: 1000:1000 # set the userid:groupid the container runs as
depends_on:
- config
environment:
SPRING_PROFILES_ACTIVE: 'jdbcconfig'
ports:
- 9090:8080
networks:
- 'external'
- 'internal'
deploy:
resources:
limits:
cpus: '4.0'
memory: 1G
# WFS microservice, port dynamically allocated to allow scaling (e.g docker-compose scale wfs=5)
wfs:
image: geoservercloud/geoserver-cloud-wfs:1.5.0
user: 1000:1000 # set the userid:groupid the container runs as
depends_on:
- config
environment:
SPRING_PROFILES_ACTIVE: 'jdbcconfig'
networks:
- 'external'
- 'internal'
deploy:
resources:
limits:
cpus: '2.0'
memory: 1G
# WMS microservice, port dynamically allocated to allow scaling (e.g docker-compose scale wms=5)
wms:
image: geoservercloud/geoserver-cloud-wms:1.5.0
user: 1000:1000 # set the userid:groupid the container runs as
depends_on:
- config
environment:
SPRING_PROFILES_ACTIVE: 'jdbcconfig'
networks:
- 'external'
- 'internal'
deploy:
resources:
limits:
cpus: '2.0'
memory: 1G
# WCS microservice, port dynamically allocated to allow scaling (e.g docker-compose scale wcs=5)
wcs:
image: geoservercloud/geoserver-cloud-wcs:1.5.0
user: 1000:1000 # set the userid:groupid the container runs as
depends_on:
- config
environment:
SPRING_PROFILES_ACTIVE: 'jdbcconfig'
networks:
- 'external'
- 'internal'
deploy:
resources:
limits:
cpus: '2.0'
memory: 1G
# REST config microservice, port dynamically allocated to allow scaling (e.g docker-compose scale rest=5)
rest:
image: geoservercloud/geoserver-cloud-rest:1.5.0
user: 1000:1000 # set the userid:groupid the container runs as
depends_on:
- config
environment:
SPRING_PROFILES_ACTIVE: 'jdbcconfig'
networks:
- 'external'
- 'internal'
deploy:
mode: replicated
replicas: 1
resources:
limits:
cpus: '1.5'
memory: 1G
# WEB UI microservice
webui:
image: geoservercloud/geoserver-cloud-webui:1.5.0
user: 1000:1000 # set the userid:groupid the container runs as
depends_on:
- rabbitmq
environment:
SPRING_PROFILES_ACTIVE: 'jdbcconfig'
GEOWEBCACHE_CACHE_DIR: /data/geowebcache
networks:
- 'external'
- 'internal'
deploy:
resources:
limits:
cpus: '2.0'
memory: 1G
gwc:
image: geoservercloud/geoserver-cloud-gwc:1.5.0
user: 1000:1000 # set the userid:groupid the container runs as
depends_on:
- config
environment:
SPRING_PROFILES_ACTIVE: 'jdbcconfig'
GEOWEBCACHE_CACHE_DIR: /data/geowebcache
networks:
- 'external'
- 'internal'
volumes:
- geowebcache_data:/data/geowebcache
deploy:
resources:
limits:
cpus: '2.0'
memory: 1G
networks:
internal:
internal: true
external:
volumes:
postgresql_config_tethys_data: # tethys data
postgresql_config_data: # volume for postgresql data, used to store the geoserver config through jdbcconfig
rabbitmq_data: # volume for rabbitmq data, so it doesn't create an anonymous one on each container
geowebcache_data: # used by gwc and web-ui to locate the default gwc tile cache directory
thredds_tomcat_local_content: # volume for thredds local tomcat directory
tethys_persist: # volume for tethys persist data
tethys_logs: # volume for tethys logs
thredds_logs:
tomcat_logs: