haiku.rag/examples/docker
2026-01-19 16:53:40 +02:00
..
.env.example Remove a2a examples, clean up 2026-01-19 16:53:40 +02:00
.gitignore
docker-compose.yml Update docker example & relevant docs 2025-11-17 14:21:08 +02:00
haiku.rag.yaml.example Update docs 2026-01-07 11:09:23 +02:00
README.md Clarify folder mounts in docker docs, check monitor paths exist in FileWatcher 2025-12-19 11:58:08 +02:00

haiku.rag Docker Compose Example

Run haiku.rag with docling-serve for remote document processing, file monitoring, and MCP server.

Architecture

This example demonstrates remote processing with two services:

  • docling-serve - Document conversion and chunking service
  • haiku-rag - MCP server and file monitoring (using slim image)

This setup showcases the minimal haiku.rag-slim image combined with external document processing, ideal for production deployments.

Quick Start

# Create required directories
mkdir -p data docs

# Create config file from example (required)
cp haiku.rag.yaml.example haiku.rag.yaml

# Start services
docker compose up -d

Place documents in docs/ for automatic indexing.

Volume Mounts

The docker-compose.yml mounts three volumes:

Host Path Container Path Purpose
./data /data Persistent LanceDB database
./docs /docs Documents to monitor and index
./haiku.rag.yaml /app/haiku.rag.yaml Configuration file

Important: The haiku.rag.yaml config file must exist before running docker compose up. Copy it from the example:

cp haiku.rag.yaml.example haiku.rag.yaml

The example config sets monitor.directories: [/docs] - this is the container path, not your host path. Documents placed in ./docs on your host will appear at /docs inside the container.

Usage

# List documents
docker compose exec haiku-rag haiku-rag list

# Search
docker compose exec haiku-rag haiku-rag search "your query"

# Ask questions
docker compose exec haiku-rag haiku-rag ask "What is haiku.rag?"

Ports

  • 5001 - docling-serve API (with UI enabled)
  • 8001 - MCP server

Configuration

The setup uses haiku.rag-slim image configured to use docling-serve for document processing:

processing:
  converter: docling-serve
  chunker: docling-serve

providers:
  docling_serve:
    base_url: http://docling-serve:5001

Edit haiku.rag.yaml to configure providers, embeddings, and other settings. See the Configuration documentation for all options.

For API keys (OpenAI, Anthropic, etc.), set them as environment variables:

export OPENAI_API_KEY=your-key-here
export ANTHROPIC_API_KEY=your-key-here
docker compose up -d

Documentation