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 FrontendBoth 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-infraThis 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-appThis runs 6 processes from a single Docker image:
| Process | Role |
|---|---|
| API | FastAPI HTTP server |
| Read Worker | EventStoreDB → MongoDB projection |
| Pipeline Worker | Event-driven workflow triggers |
| Temporal Worker | CPU-bound activities (embeddings, OCSR) |
| LLM Worker | LLM-dependent activities (summarization, NER) |
| Plugin Consumer | Kafka-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
| Component | CPU | Memory |
|---|---|---|
| API | 1 core | 512 MB |
| Temporal Worker | 2 cores | 2 GB |
| LLM Worker | 1 core | 1 GB |
| MongoDB | 1 core | 1 GB |
| EventStoreDB | 1 core | 1 GB |
| Qdrant | 1 core | 2 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