60 lines
1.4 KiB
YAML
60 lines
1.4 KiB
YAML
version: "3.9"
|
|
|
|
services:
|
|
postgres-db:
|
|
image: kartoza/postgis:12.0
|
|
ports:
|
|
- 5432:5432
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql
|
|
- ./custom-postgresql.conf:/etc/postgresql/12/main/postgresql.conf
|
|
- ./rogaining.sql:/sql/rogaining.sql
|
|
environment:
|
|
- POSTGRES_USER=${POSTGRES_USER}
|
|
- POSTGRES_PASS=${POSTGRES_PASS}
|
|
- POSTGRES_DBNAME=${POSTGRES_DBNAME}
|
|
- POSTGRES_MAX_CONNECTIONS=600
|
|
restart: "on-failure"
|
|
networks:
|
|
- rog-api
|
|
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.gdal
|
|
command: bash -c "./wait-for-postgres.sh postgres-db && python manage.py migrate && gunicorn config.wsgi:application --bind 0.0.0.0:8000"
|
|
volumes:
|
|
- .:/app
|
|
- static_volume:/app/static
|
|
- media_volume:/app/media
|
|
env_file:
|
|
- .env
|
|
restart: "on-failure"
|
|
depends_on:
|
|
- postgres-db
|
|
networks:
|
|
- rog-api
|
|
|
|
nginx:
|
|
image: nginx:1.19
|
|
volumes:
|
|
- ./nginx.conf:/etc/nginx/nginx.conf
|
|
- static_volume:/app/static
|
|
- media_volume:/app/media
|
|
- ./supervisor/html:/usr/share/nginx/html
|
|
ports:
|
|
- 8100:80
|
|
depends_on:
|
|
- app
|
|
networks:
|
|
- rog-api
|
|
|
|
networks:
|
|
rog-api:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
postgres_data:
|
|
static_volume:
|
|
media_volume:
|