DocuStore.io

Production Deployment

Deploy DocuStore to production with Docker Swarm.

For production workloads, DocuStore uses Docker Swarm with two compose stacks: infrastructure and application.

Stack Architecture

docu-store-infra.yml    →  MongoDB, EventStoreDB, Kafka, Temporal, Qdrant
docu-store-app.yml      →  API, Workers, Web Frontend

Both stacks share a Docker network (docu_store-network) for inter-service communication.

Infrastructure Stack

Deploy infrastructure services first:

docker stack deploy -c docu-store-infra.yml docu-store-infra

This provisions:

  • EventStoreDB with persistent storage
  • MongoDB with authentication enabled
  • Qdrant with snapshot persistence
  • Temporal server + PostgreSQL backend
  • Kafka + Zookeeper for event streaming

Application Stack

Once infrastructure is healthy, deploy the application:

docker stack deploy -c docu-store-app.yml docu-store-app

This runs 6 processes from a single Docker image:

ProcessRole
APIFastAPI HTTP server
Read WorkerEventStoreDB → MongoDB projection
Pipeline WorkerEvent-driven workflow triggers
Temporal WorkerCPU-bound activities (embeddings, OCSR)
LLM WorkerLLM-dependent activities (summarization, NER)
Plugin ConsumerKafka-to-Temporal bridge

Reverse Proxy

The application stack is designed to sit behind a reverse proxy (Traefik, Nginx, etc.) for TLS termination and routing:

  • docu-store.example.com → Web frontend (port 3000)
  • docu-store-api.example.com → API server (port 8000)

Resource Recommendations

ComponentCPUMemory
API1 core512 MB
Temporal Worker2 cores2 GB
LLM Worker1 core1 GB
MongoDB1 core1 GB
EventStoreDB1 core1 GB
Qdrant1 core2 GB

Total minimum: 8 cores, 8 GB RAM (excluding LLM inference if using Ollama locally).

Monitoring

  • Langfuse for LLM tracing and prompt observability
  • Umami for web analytics
  • Temporal Dashboard for workflow monitoring