version: "3.9"
services:
  app:
    build: .
    ports: ["3000:3000"]
    environment:
      - PORT=3000
      - MONGO_URL=mongodb://mongo:27017/agents_db
      - OPENAI_API_KEY=${OPENAI_API_KEY}
      - OPENAI_MODEL=${OPENAI_MODEL:-gpt-4o-mini}
    depends_on: [mongo]
  mongo:
    image: mongo:6
    restart: always
    ports: ["27017:27017"]
    volumes: [ "mongo_data:/data/db" ]
volumes: { mongo_data: {} }
