-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
75 lines (68 loc) · 1.68 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
# version: "3.8"
# services:
# postgres:
# image: postgres
# environment:
# - POSTGRES_DB=postgres
# - POSTGRES_USER=postgres
# - POSTGRES_PASSWORD=postgres
# django:
# build: .
# #command: python manage.py runserver 0.0.0.0:8000
# command: /code/start.sh
# volumes:
# - .:/code
# ports:
# - "8000:8000"
# depends_on:
# - postgres
# docker-compose build
version: '3.8'
volumes:
# dbbackups:
postgis-data:
services:
postgres:
image: kartoza/postgis:13.0
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=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASS=postgres
# - ALLOW_IP_RANGE=0.0.0.0/0
# Add extensions you need to be enabled by default in the DB. Default are the five specified below
- POSTGRES_MULTIPLE_EXTENSIONS=postgis
# ports:
# - 25432:5432
restart: "no"
healthcheck:
test: "exit 0"
django:
build: .
#command: python manage.py runserver 0.0.0.0:8000
command: /code/start.sh
volumes:
- .:/code
ports:
- "8000:8000"
depends_on:
- postgres
# dbbackups:
# image: kartoza/pg-backup:13.0
# hostname: pg-backups
# volumes:
# - dbbackups:/backups
# environment:
# - DUMPPREFIX=PG_db
# - POSTGRES_USER=docker
# - POSTGRES_PASS=docker
# - POSTGRES_PORT=5432
# - POSTGRES_HOST=db
# - POSTGRES_DBNAME=gis
# restart: on-failure
# depends_on:
# postgres:
# condition: service_healthy