45 lines
1.4 KiB
YAML
45 lines
1.4 KiB
YAML
version: '3'
|
|
services:
|
|
geoserver:
|
|
build:
|
|
context: .
|
|
args:
|
|
- GEOSERVER_VERSION=2.25.3
|
|
- 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@sha256:5f8a84055bedfb32bd89d915bec42cb07ba444fdfb0d5a4091a6d3dfc9c13b0c
|
|
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
|