version: "3"
services:
  web:
    build: .
    command: python manage.py runserver 0.0.0.0:8000
    container_name: minori-app
    volumes:
      - .:/app
    ports:
      - "8000:8000"
    env_file:
      - .env
    tty: true
    depends_on:
      - db

  db:
    image: postgres:14.6
    container_name: minori-db
    ports:
      - "5432:5432"
    volumes:
      - postgres_data:/var/lib/postgresql/data
    environment:
      POSTGRES_DB: minori
      POSTGRES_USER: minori
      POSTGRES_PASSWORD: minori

volumes:
  postgres_data:
  static_volume: