version: '3.8'

services:
  api:
    image: your_api_image_name
    build:
      context: ./src
      dockerfile: Dockerfile
    volumes:
      - ./src:/app
    ports:
      - "8000:8000"
    environment:
      - DATABASE_URL=postgres://user:password@db:5432/dbname
      - SECRET_KEY=your_secret_key
    depends_on:
      - db

  supervisor-web:
    image: nginx:latest
    volumes:
      - ./src:/usr/share/nginx/html
    ports:
      - "8100:80"

  db:
    image: postgres:latest
    volumes:
      - db_data:/var/lib/postgresql/data
    environment:
      - POSTGRES_USER=user
      - POSTGRES_PASSWORD=password
      - POSTGRES_DB=dbname

volumes:
  db_data: