-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
232 lines (230 loc) · 6.46 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
version: '3.9'
networks:
geocluster:
services:
### PostgreSQL
db:
image: kartoza/postgis:14-3.1
volumes:
- ./pg_data:/var/lib/postgresql
environment:
- POSTGRES_PORT=5432
- POSTGRES_DB=gis
- POSTGRES_USER=docker
- POSTGRES_PASS=docker
- ALLOW_IP_RANGE=0.0.0.0/0
- FORCE_SSL=FALSE
ports:
- 5455:5432
restart: on-failure
healthcheck:
test: "PGPASSWORD=docker pg_isready -h 127.0.0.1 -U docker -d gis"
networks:
- geocluster
### Active-MQ
geobroker:
image: kartoza/activemq-docker:2.20.6
build:
context: ./scripts/docker/build/activemq
dockerfile: Dockerfile
environment:
- JAVA_HOME=/opt/java/openjdk
- HOST=db
- POSTGRES_PORT=5432
- POSTGRES_DB=gis
- POSTGRES_USER=docker
- POSTGRES_PASS=docker
- SSL_MODE=false
- ACTIVEMQ_SERVER_URI=tcp://0.0.0.0:61616?maximumConnections=1000&wireFormat.maxFrameSize=104857600&jms.useAsyncSend=false&transport.daemon=true
- ACTIVEMQ_SERVER_DISCOVERYURI=multicast://default
restart: on-failure
depends_on:
db:
condition: service_healthy
ports:
- 8161:8161
- 61616:61616
healthcheck:
test: netstat -ltn | grep -c ":61616"
interval: 60s
timeout: 15s
retries: 10
networks:
- geocluster
### Geoserver-1
gs-node1:
image: geobeyond/geoserver:2.20.6.patched
volumes:
- ./geo_data:/opt/geoserver/data_dir_shared
ports:
- "8081:8080"
environment:
- BROKER_URL=tcp://geobroker:61616
- GEOSERVER_ADMIN_PASSWORD=Geo$$erver1!
- GEOSERVER_ADMIN_USER=admin
- GEOSERVER_DATA_DIR=/opt/geoserver/data_dir_shared
- STABLE_EXTENSIONS=oracle-plugin,importer-plugin
- COMMUNITY_EXTENSIONS=sec-oauth2-openid-connect-plugin
- RESET_ADMIN_CREDENTIALS=TRUE
- READONLY=disabled
- CLUSTER_DURABILITY=false
- CLUSTERING=True
- TOGGLE_MASTER=true
- TOGGLE_SLAVE=true
- EMBEDDED_BROKER=disabled
- CLUSTER_CONNECTION_RETRY_COUNT=10
- CLUSTER_CONNECTION_MAX_WAIT=500
- DB_BACKEND=POSTGRES
- HOST=db
- POSTGRES_PORT=5432
- POSTGRES_DB=gis
- POSTGRES_USER=docker
- POSTGRES_PASS=docker
- SSL_MODE=allow
- RANDOMSTRING=23bd87cfa327d47e-node1
- INSTANCE_STRING=ac3bcba2fa7d989678a01ef4facc4173010cd8b40d2e5f5a8d18d5f863ca976f-node1
- EXISTING_DATA_DIR=false
- SAMPLE_DATA=false
restart: on-failure
depends_on:
db:
condition: service_healthy
geobroker:
condition: service_healthy
healthcheck:
test: curl --fail -s http://127.0.0.1:8080/geoserver/web || exit 1
interval: 1m30s
timeout: 10s
retries: 5
start_period: 100s
networks:
- geocluster
### Geoserver-2
gs-node2:
image: geobeyond/geoserver:2.20.6.patched
volumes:
- ./geo_data:/opt/geoserver/data_dir_shared
ports:
- "8082:8080"
environment:
- BROKER_URL=tcp://geobroker:61616
- GEOSERVER_ADMIN_PASSWORD=Geo$$erver1!
- GEOSERVER_ADMIN_USER=admin
- GEOSERVER_DATA_DIR=/opt/geoserver/data_dir_shared
- STABLE_EXTENSIONS=oracle-plugin,importer-plugin
- COMMUNITY_EXTENSIONS=sec-oauth2-openid-connect-plugin
- RESET_ADMIN_CREDENTIALS=TRUE
- READONLY=disabled
- CLUSTER_DURABILITY=false
- CLUSTERING=True
- TOGGLE_MASTER=true
- TOGGLE_SLAVE=true
- EMBEDDED_BROKER=disabled
- CLUSTER_CONNECTION_RETRY_COUNT=10
- CLUSTER_CONNECTION_MAX_WAIT=500
- DB_BACKEND=POSTGRES
- HOST=db
- POSTGRES_PORT=5432
- POSTGRES_DB=gis
- POSTGRES_USER=docker
- POSTGRES_PASS=docker
- SSL_MODE=allow
- RANDOMSTRING=23bd87cfa327d47e-node2
- INSTANCE_STRING=ac3bcba2fa7d989678a01ef4facc4173010cd8b40d2e5f5a8d18d5f863ca976f-node2
- EXISTING_DATA_DIR=false
- SAMPLE_DATA=false
restart: on-failure
depends_on:
db:
condition: service_healthy
gs-node1:
condition: service_healthy
geobroker:
condition: service_healthy
healthcheck:
test: curl --fail -s http://127.0.0.1:8080/geoserver/web || exit 1
interval: 1m30s
timeout: 10s
retries: 5
start_period: 100s
networks:
- geocluster
### Geoserver-3
gs-node3:
image: geobeyond/geoserver:2.20.6.patched
volumes:
- ./geo_data:/opt/geoserver/data_dir_shared
ports:
- "8083:8080"
environment:
- BROKER_URL=tcp://geobroker:61616
- GEOSERVER_ADMIN_PASSWORD=Geo$$erver1!
- GEOSERVER_ADMIN_USER=admin
- GEOSERVER_DATA_DIR=/opt/geoserver/data_dir_shared
- STABLE_EXTENSIONS=oracle-plugin,importer-plugin
- COMMUNITY_EXTENSIONS=sec-oauth2-openid-connect-plugin
- RESET_ADMIN_CREDENTIALS=TRUE
- READONLY=disabled
- CLUSTER_DURABILITY=false
- CLUSTERING=True
- TOGGLE_MASTER=true
- TOGGLE_SLAVE=true
- EMBEDDED_BROKER=disabled
- CLUSTER_CONNECTION_RETRY_COUNT=10
- CLUSTER_CONNECTION_MAX_WAIT=500
- DB_BACKEND=POSTGRES
- HOST=db
- POSTGRES_PORT=5432
- POSTGRES_DB=gis
- POSTGRES_USER=docker
- POSTGRES_PASS=docker
- SSL_MODE=allow
- RANDOMSTRING=23bd87cfa327d47e-node3
- INSTANCE_STRING=ac3bcba2fa7d989678a01ef4facc4173010cd8b40d2e5f5a8d18d5f863ca976f-node3
- EXISTING_DATA_DIR=false
- SAMPLE_DATA=false
restart: on-failure
depends_on:
db:
condition: service_healthy
gs-node1:
condition: service_healthy
gs-node2:
condition: service_healthy
geobroker:
condition: service_healthy
healthcheck:
test: curl --fail -s http://127.0.0.1:8080/geoserver/web || exit 1
interval: 1m30s
timeout: 10s
retries: 5
start_period: 100s
networks:
- geocluster
### Load balancer
caddy:
image: caddy:latest
build:
context: ./scripts/docker/build/caddy
dockerfile: Dockerfile
ports:
- 9001:9001
- 80:80
- 443:443
healthcheck:
test: curl --fail -s http://localhost || exit 1
interval: 1m
retries: 5
start_period: 20s
timeout: 10s
depends_on:
gs-node1:
condition: service_healthy
gs-node2:
condition: service_healthy
gs-node3:
condition: service_healthy
geobroker:
condition: service_healthy
networks:
- geocluster