forked from geoserver/geoserver-cloud
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
309 lines (294 loc) · 7.99 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
version: "3.8"
volumes:
rabbitmq_data: # volume for rabbitmq data, so it doesn't create an anonymous one on each container
postgis_data:
geowebcache_data:
acl_data:
networks:
gs-cloud-network:
# driver: bridge
services:
postgis:
image: postgis/postgis:latest
environment:
POSTGRES_DB: postgis
POSTGRES_USER: postgis
POSTGRES_PASSWORD: postgis
POSTGIS_GDAL_ENABLED_DRIVERS: ENABLE_ALL
networks:
- gs-cloud-network
volumes:
- postgis_data:/var/lib/postgresql/data
ports:
- 5432:5432
deploy:
resources:
limits:
cpus: '2.0'
memory: 1G
acldb:
image: postgis/postgis:latest
environment:
- POSTGRES_DB=acl
- POSTGRES_USER=acl
- POSTGRES_PASSWORD=acls3cr3t
networks:
- gs-cloud-network
volumes:
- acl_data:/var/lib/postgresql/data
ports:
- 6432:5432
deploy:
resources:
limits:
cpus: '2.0'
memory: 1G
rabbitmq:
image: rabbitmq:3.11-management
user: ${GS_USER}
restart: always
volumes:
- rabbitmq_data:/var/lib/rabbitmq
networks:
- gs-cloud-network
ports:
- "5672:5672"
- "15672:15672"
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:${TAG}
user: ${GS_USER}
environment:
JAVA_OPTS: "${DISCOVERY_JAVA_OPTS}"
ports:
- 8761:8761 # for development, so services can be run from localhost and find the discovery service running on docker
networks:
- gs-cloud-network
depends_on:
- config
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:${TAG}
user: ${GS_USER}
environment:
JAVA_OPTS: "${CONFIG_JAVA_OPTS}"
# 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: native
# 'git' profile config
CONFIG_GIT_URI: https://github.com/geoserver/geoserver-cloud-config
CONFIG_GIT_BASEDIR: /tmp/git_config
# 'native' profile config
CONFIG_NATIVE_PATH: /tmp/config
networks:
- gs-cloud-network
volumes:
- ./config:/tmp/config
ports:
- 8888:8080
deploy:
resources:
limits:
cpus: '2.0'
memory: 512M
admin:
image: geoservercloud/geoserver-cloud-admin-server:${TAG}
user: ${GS_USER}
depends_on:
- discovery
ports:
- 9091:8080
networks:
- gs-cloud-network
deploy:
resources:
limits:
cpus: '2.0'
memory: 512M
# 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:${TAG}
user: ${GS_USER}
depends_on:
- discovery
environment:
JAVA_OPTS: ${GATEWAY_JAVA_OPTS}
SPRING_PROFILES_ACTIVE: dev #exposes the catalog and config API at /api/v1/**
RETRY_MAX_ATTEMPTS: 100
# eat our own dogfood and set a base path
GEOSERVER_BASE_PATH: ${BASE_PATH}
ports:
- 9090:8080
networks:
- gs-cloud-network
deploy:
resources:
limits:
cpus: '4.0'
memory: 1G
acl:
image: geoservercloud/geoserver-acl:1.0.0
volumes:
- ./config/acl-service.yml:/opt/app/bin/acl.yml
depends_on:
- acldb
environment:
GEOSERVER_BASE_PATH: ${BASE_PATH}
networks:
- gs-cloud-network
ports:
- 9000:8080
deploy:
resources:
limits:
cpus: '4.0'
memory: 2G
# WFS microservice, port dynamically allocated to allow scaling (e.g docker-compose scale wfs=5)
wfs:
image: geoservercloud/geoserver-cloud-wfs:${TAG}
user: ${GS_USER}
depends_on:
- rabbitmq
- discovery
environment:
SPRING_PROFILES_ACTIVE: "${DEFAULT_PROFILES}"
JAVA_OPTS: "${WFS_JAVA_OPTS}"
RETRY_MAX_ATTEMPTS: 100
networks:
- gs-cloud-network
#tmpfs: #TODO: avoid runs creating volumes at all
# - /tmp
deploy:
resources:
limits:
cpus: '2.0'
memory: 2G
# WMS microservice, port dynamically allocated to allow scaling (e.g docker-compose scale wms=5)
wms:
image: geoservercloud/geoserver-cloud-wms:${TAG}
user: ${GS_USER}
depends_on:
- rabbitmq
- discovery
environment:
SPRING_PROFILES_ACTIVE: "${DEFAULT_PROFILES}"
JAVA_OPTS: "${WMS_JAVA_OPTS}"
RETRY_MAX_ATTEMPTS: 100
networks:
- gs-cloud-network
deploy:
resources:
limits:
cpus: '2.0'
memory: 2G
# WCS microservice, port dynamically allocated to allow scaling (e.g docker-compose scale wcs=5)
wcs:
image: geoservercloud/geoserver-cloud-wcs:${TAG}
user: ${GS_USER}
depends_on:
- rabbitmq
- discovery
environment:
SPRING_PROFILES_ACTIVE: "${DEFAULT_PROFILES}"
JAVA_OPTS: "${WCS_JAVA_OPTS}"
RETRY_MAX_ATTEMPTS: 100
networks:
- gs-cloud-network
deploy:
resources:
limits:
cpus: '2.0'
memory: 2G
# WPS microservice, port dynamically allocated to allow scaling (e.g docker-compose scale wps=5)
wps:
image: geoservercloud/geoserver-cloud-wps:${TAG}
user: ${GS_USER}
depends_on:
- rabbitmq
- discovery
environment:
SPRING_PROFILES_ACTIVE: "${DEFAULT_PROFILES}"
JAVA_OPTS: "${WPS_JAVA_OPTS}"
RETRY_MAX_ATTEMPTS: 100
networks:
- gs-cloud-network
deploy:
resources:
limits:
cpus: '2.0'
memory: 2G
# REST config microservice, port dynamically allocated to allow scaling (e.g docker-compose scale rest=5)
rest:
image: geoservercloud/geoserver-cloud-rest:${TAG}
user: ${GS_USER}
depends_on:
- rabbitmq
- discovery
environment:
SPRING_PROFILES_ACTIVE: "${DEFAULT_PROFILES}"
JAVA_OPTS: "${REST_JAVA_OPTS}"
RETRY_MAX_ATTEMPTS: 100
networks:
- gs-cloud-network
deploy:
mode: replicated
replicas: 1
resources:
limits:
cpus: '1.5'
memory: 2G
# WEB UI microservice
webui:
image: geoservercloud/geoserver-cloud-webui:${TAG}
user: ${GS_USER}
depends_on:
- rabbitmq
- discovery
environment:
SPRING_PROFILES_ACTIVE: "${DEFAULT_PROFILES}"
JAVA_OPTS: "${WEBUI_JAVA_OPTS}"
RETRY_MAX_ATTEMPTS: 100
networks:
- gs-cloud-network
volumes:
- geowebcache_data:/data/geowebcache
deploy:
resources:
limits:
cpus: '2.0'
memory: 2G
gwc:
image: geoservercloud/geoserver-cloud-gwc:${TAG}
user: ${GS_USER}
depends_on:
- rabbitmq
- discovery
environment:
SPRING_PROFILES_ACTIVE: "${DEFAULT_PROFILES}"
RETRY_MAX_ATTEMPTS: 100
networks:
- gs-cloud-network
volumes:
- geowebcache_data:/data/geowebcache
deploy:
resources:
limits:
cpus: '2.0'
memory: 2G