right-tree/docker-compose.production.yaml
Dana Lambert ecc6e9eabe Production config fixes
- Deletes redundant files
- Adds right-tree db env vars to default.env
- Updates port mapping for docker-compose.production.yaml
- Adjusts production methods in dev
2021-11-25 20:00:02 +00:00

48 lines
1.1 KiB
YAML

version: "3.8"
volumes:
righttree-postgres-data:
name: righttree-postgres-data
services:
backend:
restart: unless-stopped
build:
context: backend
dockerfile: Dockerfile
container_name: backend
depends_on:
- postgres
env_file: .env
ports:
- "8000:8000"
command: bash -c "gunicorn --bind 0.0.0.0:8000 right_tree.wsgi"
nginx:
container_name: nginx
image: nginx
depends_on:
- postgres
- backend
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- ./backend/right_tree/staticfiles:/etc/nginx/html/staticfiles
- ./frontend/build:/etc/nginx/html/build
- ./keys:/etc/ssl/private/nginx
ports:
- "80:80"
postgres:
image: postgis/postgis:13-3.0
restart: unless-stopped
container_name: postgres
volumes:
- righttree-postgres-data:/var/lib/postgresql/data
- ./create_database.sql:/docker-entrypoint-initdb.d/create_database.sql
ports:
- "5432:5432"
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}