-
Notifications
You must be signed in to change notification settings - Fork 422
/
docker-compose-nginx.yml
60 lines (57 loc) · 1.76 KB
/
docker-compose-nginx.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
volumes:
geoserver-data:
geo-db-data:
services:
db:
image: kartoza/postgis:${POSTGIS_VERSION_TAG}
volumes:
- geo-db-data:/var/lib/postgresql
ports:
- ${POSTGRES_PORT}:5432
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASS=${POSTGRES_PASS}
- ALLOW_IP_RANGE=${ALLOW_IP_RANGE}
- FORCE_SSL=TRUE
restart: on-failure
healthcheck:
test: "PGPASSWORD=${POSTGRES_PASS} pg_isready -h 127.0.0.1 -U ${POSTGRES_USER} -d ${POSTGRES_DB}"
interval: 30s
timeout: 10s
retries: 3
start_period: 1m
geoserver:
image: kartoza/geoserver:${GS_VERSION}
volumes:
- geoserver-data:/opt/geoserver/data_dir
restart: on-failure
environment:
- GEOSERVER_DATA_DIR=${GEOSERVER_DATA_DIR}
- GEOWEBCACHE_CACHE_DIR=${GEOWEBCACHE_CACHE_DIR}
- GEOSERVER_ADMIN_PASSWORD=${GEOSERVER_ADMIN_PASSWORD}
- GEOSERVER_ADMIN_USER=${GEOSERVER_ADMIN_USER}
- INITIAL_MEMORY=${INITIAL_MEMORY}
- MAXIMUM_MEMORY=${MAXIMUM_MEMORY}
depends_on:
db:
condition: service_healthy
healthcheck:
test: [ "CMD-SHELL", "curl --fail --silent --write-out 'HTTP CODE : %{http_code}\n' --output /dev/null -u $${GEOSERVER_ADMIN_USER}:$${GEOSERVER_ADMIN_PASSWORD} http://localhost:8080/geoserver/rest/about/version.xml" ]
interval: 1m30s
timeout: 10s
retries: 3
start_period: 1m
nginx:
image: nginx
volumes:
- ./sites-enabled:/etc/nginx/conf.d:ro
logging:
driver: json-file
options:
max-size: 200m
max-file: '10'
depends_on:
- geoserver
ports:
- "80:80"