forked from geoserver/docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-demo.yml
44 lines (44 loc) · 1.31 KB
/
docker-compose-demo.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
version: '3'
services:
geoserver:
build:
context: .
args:
- GEOSERVER_VERSION=2.25.1
- CORS_ENABLED=true
- CORS_ALLOWED_METHODS=GET,POST,PUT,HEAD,OPTIONS
ports:
- "80:8080"
environment:
- INSTALL_EXTENSIONS=true
- STABLE_EXTENSIONS=wps,csw
- EXTRA_JAVA_OPTS=-Xms1G -Xmx2G
- POSTGRES_JNDI_ENABLED=true
- POSTGRES_HOST=postgis
- POSTGRES_PORT=5432
- POSTGRES_DB=geoserver
- POSTGRES_USERNAME=geoserver
- POSTGRES_PASSWORD=geoserver
- POSTGRES_JNDI_RESOURCE_NAME=jdbc/postgres
volumes:
- ./geoserver_data:/opt/geoserver_data/:Z
- ./additional_libs:/opt/additional_libs:Z # by mounting this we can install libs from host on startup
healthcheck:
test: curl --fail "http://localhost:8080/geoserver/web/wicket/resource/org.geoserver.web.GeoServerBasePage/img/logo.png" || exit 1
interval: 1m
retries: 3
timeout: 20s
postgis:
image: postgis/postgis:16-3.4-alpine
ports:
- "5555:5432"
environment:
POSTGRES_USER: geoserver
POSTGRES_PASSWORD: geoserver
volumes:
- ./postgis/postgresql_data:/var/lib/postgresql/data:Z
healthcheck:
test: pg_isready -U geoserver -h localhost -t 5 || exit 1
interval: 10s
retries: 5
timeout: 10s