version: '3.8'

services:
  fastapi:
    container_name: fastapi-container
    image: alarm-detection-system:latest
    ports:
      - "8000:8000"
    environment:
      - PYTHONPATH=/app:/app/src
    command: uvicorn src.api.main:app --host 0.0.0.0 --port 8000 --reload
    volumes:
      - .:/app
    networks:
      - alarm_network

  streamlit:
    container_name: streamlit-container
    image: alarm-detection-system:latest
    ports:
      - "8501:8501"
    environment:
      - PYTHONPATH=/app:/app/src
    command: streamlit run streamlit_app/app.py
    volumes:
      - .:/app
    depends_on:
      - fastapi
    networks:
      - alarm_network

networks:
  alarm_network:
    driver: bridge