forked from opengisch/django-oapif
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
66 lines (60 loc) · 1.53 KB
/
docker-compose.yml
File metadata and controls
66 lines (60 loc) · 1.53 KB
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
# default stack
version: '3.7'
services:
caddy:
build:
context: .
dockerfile: docker/caddy/Dockerfile
volumes:
- caddy_data:/data
- static_volume:/static_volume
- media_volume:/media_volume
restart: unless-stopped
environment:
OGCAPIF_HOST: ${OGCAPIF_HOST:?}
ports:
- 80:80
- 443:443
django:
image: opengisch/signalo-oapif:latest
build:
context: .
dockerfile: docker/django/Dockerfile
cache_from:
- opengisch/signalo-oapif:latest
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
volumes:
- static_volume:/static_volume
- media_volume:/media_volume
environment:
DJANGO_DEBUG: "true"
OGCAPIF_HOST: ${OGCAPIF_HOST:?}
DJANGO_SECRET_KEY: ${DJANGO_SECRET_KEY:?}
DJANGO_STATIC_ROOT: /static_volume
DJANGO_MEDIA_ROOT: /media_volume
GEOMETRY_SRID: ${GEOMETRY_SRID:-2056}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?}
TX_TOKEN: ${TX_TOKEN}
command: python3 manage.py runserver 0.0.0.0:8000
postgres:
image: postgis/postgis:13-3.1
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
volumes:
- postgres_data:/var/lib/postgresql/data
## UNCOMMENT IF YOU NEED THE POSTGIS DATABASE TO BE ACCESSIBLE
# ports:
# - 5432:5432
volumes:
static_volume:
media_volume:
caddy_data:
postgres_data: