villafleurie/docker-compose.yml

34 lines
634 B
YAML

version: "3"
volumes:
static_files:
media:
services:
db:
image: postgres
web:
build: .
command: bash -c "python manage.py migrate && python manage.py loaddata villafleurie.json && gunicorn -w 4 villafleurie.wsgi -b 0.0.0.0:8000"
volumes:
- .:/villafleurie
- static_files:/static_files
- media:/villafleurie/media
ports:
- "8000:8000"
depends_on:
- db
env_file: prod.env
nginx:
build:
context: .
dockerfile: nginx/Dockerfile
ports:
- 80:80
volumes:
- static_files:/static_files
- media:/media
depends_on:
- web