services: backend: build: context: ./backend dockerfile: Dockerfile ports: - "8000:8000" environment: - DB_PATH=/app/data/haiku.rag.lancedb # API keys (set these in your shell or .env file) - OPENAI_API_KEY=${OPENAI_API_KEY} - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY} volumes: - ./backend:/app - /app/.venv - ${DB_PATH}:/app/data/haiku.rag.lancedb - ./haiku.rag.yaml:/app/haiku.rag.yaml:ro networks: - ag-ui-network extra_hosts: - "host.docker.internal:host-gateway" restart: unless-stopped healthcheck: test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"] interval: 30s timeout: 10s retries: 3 frontend: build: context: ./frontend dockerfile: Dockerfile ports: - "3000:3000" environment: - BACKEND_URL=http://backend:8000 volumes: - ./frontend:/app - /app/node_modules - /app/.next depends_on: - backend networks: - ag-ui-network restart: unless-stopped networks: ag-ui-network: driver: bridge