# One-command run for local deployment and testing.
# From repo root: docker compose up --build
# Backend API: http://localhost:8080 (GET /health, GET /metrics, WebSocket /ws/)
# Frontend (test UI): http://localhost:3000/voicebot
services:
  voice-agent:
    build:
      context: ./BackEnd/agent-starter-python
      dockerfile: Dockerfile
      target: server
    ports:
      - "8080:8080"
    env_file:
      - ./BackEnd/agent-starter-python/.env.local
    environment:
      - PORT=8080
    restart: "no"

  frontend:
    build:
      context: ./FrontEnd/agent-starter-react/agent-starter-react
      dockerfile: Dockerfile
      args:
        # URLs the browser uses to reach the backend (host ports)
        NEXT_PUBLIC_METRICS_URL: http://localhost:8080
        NEXT_PUBLIC_WS_URL: ws://localhost:8080
    ports:
      - "3000:3000"
    depends_on:
      - voice-agent
    restart: "no"
