services: api: build: # Context stays at the repo root: the API image needs requirements.txt, # data/ and eval_docs/, which live alongside app/, not inside it. context: . dockerfile: app/Dockerfile container_name: plum-claims-api environment: # Defaults to the mock LLM so `docker compose up` works end-to-end with no # API keys. For real LLM calls, set LLM_PROVIDER=groq (or gemini) and the # matching key in a .env file next to this compose file. LLM_PROVIDER: ${LLM_PROVIDER:-mock} GROQ_API_KEY: ${GROQ_API_KEY:-} GROQ_MODEL: ${GROQ_MODEL:-meta-llama/llama-4-scout-17b-16e-instruct} GEMINI_API_KEY: ${GEMINI_API_KEY:-} DB_PATH: /tmp/claims.db POLICY_PATH: data/policy_terms.json TEST_CASES_PATH: data/test_cases.json LOG_LEVEL: ${LOG_LEVEL:-INFO} ports: - "8000:8000" healthcheck: test: ["CMD", "python", "-c", "import httpx; httpx.get('http://localhost:8000/health').raise_for_status()"] interval: 15s timeout: 5s retries: 3 start_period: 10s ui: # React SPA served by nginx, which reverse-proxies /claims, /members, /eval # and /health to the api service — so the browser talks to one origin only. build: # The UI is self-contained, so it builds from its own directory as the # context (governed by frontend/.dockerignore). context: frontend dockerfile: Dockerfile container_name: plum-claims-ui ports: - "8501:80" depends_on: api: condition: service_healthy