added gunicorn
This commit is contained in:
54
docker-compose-prod.yaml
Normal file
54
docker-compose-prod.yaml
Normal file
@ -0,0 +1,54 @@
|
||||
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
|
||||
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: gunicorn config.wsgi:application --bind 0.0.0.0:8000
|
||||
volumes:
|
||||
- .:/app
|
||||
- static_volume:/app/static
|
||||
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
|
||||
ports:
|
||||
- 8100:80
|
||||
depends_on:
|
||||
- app
|
||||
networks:
|
||||
- rog-api
|
||||
|
||||
networks:
|
||||
rog-api:
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
static_volume:
|
||||
Reference in New Issue
Block a user