django-test/docker-compose.prod.yaml

39 lines
715 B
YAML
Raw Normal View History

2022-08-26 10:41:18 +00:00
version: '3.3'
services:
web:
build:
context: .
dockerfile: Dockerfile.prod
command: gunicorn example.wsgi:application --bind 0.0.0.0:8000
volumes:
- static_volume:/home/app/staticfiles
- media_volume:/home/app/mediafiles
expose:
- 8000
env_file:
- ./.env.prod
depends_on:
- db
db:
image: postgres:14.5-alpine
volumes:
- postgres_data_prod:/var/lib/postgresql/data/
env_file:
- ./.env.prod.db
nginx:
build: ./nginx
volumes:
- static_volume:/home/app/staticfiles
ports:
- 1337:80
depends_on:
- web
volumes:
postgres_data_prod:
static_volume:
media_volume: