forked from kartoza/docker-postgis
-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
46 lines (43 loc) · 1.08 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
# docker-compose build
# docker-compose up -d web
version: '2.1'
volumes:
dbbackups:
postgis-data:
services:
db:
image: kartoza/postgis:11.0-2.5
volumes:
- postgis-data:/var/lib/postgresql
- dbbackups:/backups
environment:
# If you need to create multiple database you can add coma separated databases eg gis,data
- POSTGRES_DB=gis
- POSTGRES_USER=docker
- POSTGRES_PASS=docker
- ALLOW_IP_RANGE=0.0.0.0/0
# Add extensions you need to be enabled by default in the DB. Default are the three specified below
#- POSTGRES_MULTIPLE_EXTENSIONS=postgis,hstore,postgis_topology
ports:
- 5434:5432
restart: on-failure
healthcheck:
test: "exit 0"
dbbackups:
image: kartoza/pg-backup:11.0
hostname: pg-backups
volumes:
- dbbackups:/backups
links:
- db:db
environment:
- DUMPPREFIX=demo
- PGUSER=docker
- PGPASSWORD=docker
- PGDATABASE=gis
- PGPORT=5432
- PGHOST=db
restart: on-failure
depends_on:
db:
condition: service_healthy