haiku.rag/app/docker-compose.dev.yml
Yiorgis Gozadinos a04a16c717
Remove the environment overrides and the last unnamed-database wording
HAIKU_RAG_DB and DB_PATH are gone: a capability covers what the
configuration places or the db_path it is given, and the app backend and
the AG-UI example load their configuration as the CLI does. The compose
files point HAIKU_RAG_CONFIG_PATH at the mounted haiku.rag.yaml, which
places the database at /data where DB_VOLUME is mounted; the backend
refuses a configured set since it serves one database. The chat scopes a
selection by source only over a set and names databases on filter rows
only across several. Docstrings, docs and test fixtures stop describing an
unnamed database; every database a search, listing or citation reports
carries a name.
2026-09-03 15:12:09 +03:00

46 lines
1.4 KiB
YAML

# Local development with hot reloading
# Usage: docker compose -f docker-compose.dev.yml up --build
services:
backend:
build:
context: ..
dockerfile: app/backend/Dockerfile
command: ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
working_dir: /app/src
# No authentication; bound to loopback. The frontend reaches it over the compose network.
ports:
- "127.0.0.1:8001:8000"
environment:
- HAIKU_RAG_CONFIG_PATH=/app/haiku.rag.yaml
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-}
- OPENAI_API_KEY=${OPENAI_API_KEY:-}
- OLLAMA_BASE_URL=${OLLAMA_BASE_URL:-http://host.docker.internal:11434}
- LOGFIRE_TOKEN=${LOGFIRE_TOKEN:-}
volumes:
# haiku.rag.yaml places the database at /data.
- ${DB_VOLUME:-./data/haiku.rag.lancedb}:/data
- ./backend:/app/src:ro
- ./haiku.rag.yaml:/app/haiku.rag.yaml:ro
extra_hosts:
- "host.docker.internal:host-gateway"
frontend:
build:
context: frontend
dockerfile: Dockerfile
target: base
command: sh -c "pnpm install && pnpm dev"
working_dir: /app
ports:
- "3000:3000"
environment:
- BACKEND_URL=http://backend:8000
- HOSTNAME=0.0.0.0
volumes:
- ./frontend:/app
- frontend_node_modules:/app/node_modules
depends_on:
- backend
volumes:
frontend_node_modules: