-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose-prod.yml
48 lines (44 loc) · 1.24 KB
/
docker-compose-prod.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
version: '3.9'
services:
database:
image: geonode/postgis:15
container_name: db4${COMPOSE_PROJECT_NAME}
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- GIS_DB_NAME=${GIS_DB_NAME}
- GIS_DB_USER=${GIS_DB_USER}
- GIS_DB_PASSWORD=${GIS_DB_PASSWORD}
healthcheck:
test: [ "CMD", "pg_isready", "-q", "-d", "postgres", "-U", "$POSTGRES_USER" ]
timeout: 40s
interval: 10s
retries: 10
volumes:
- ./initdb:/docker-entrypoint-initdb.d/
- postgres_data_dev:/var/lib/postgresql/data/
ports:
- "5432:5432"
restart: always
web:
build:
context: .
dockerfile: Dockerfile
container_name: web4${COMPOSE_PROJECT_NAME}
command: python /home/geouser/nairobi_busstops/manage.py runserver 0.0.0.0:8000
volumes:
- static_volume:/home/geouser/nairobi_busstops/staticfiles
- media_volume:/home/geouser/nairobi_busstops/mediafiles
ports:
- "8000:8000"
env_file:
- .env
environment:
- DJANGO_SETTINGS_MODULE=mywebgis.settings.prod
depends_on:
database:
condition: service_healthy
restart: always
volumes:
postgres_data_dev:
static_volume:
media_volume: