version: '3.8'

services:
  web:
    build: .
    command: gunicorn --bind 0.0.0.0:8000 core.wsgi:application
    volumes:
      - .:/app
    ports:
      - "8000:8000"
    env_file:
      - .env
    depends_on:
      - db

  db:
    image: postgres:15
    volumes:
      - postgres_data:/var/lib/postgresql/data/
    environment:
      - POSTGRES_USER=user
      - POSTGRES_PASSWORD=password
      - POSTGRES_DB={{ project_name }}

volumes:
  postgres_data:
