Document RAG platform: Upload docs, query with AI. React + FastAPI + Ollama in unified container.
544
🧠 DSPy Integration - Advanced prompt optimization and structured outputs
🤖 Multi-Provider LLM Support - Choose from 5 different AI providers:
💬 Enhanced User Experience
DocuRAG is a comprehensive document analysis platform that combines React frontend, FastAPI backend, DSPy-enhanced RAG pipeline, and multi-provider LLM integration for intelligent document querying. Upload documents, organize by categories, and query using natural language with complete privacy or cloud AI power.
Features: User authentication, document management, category organization, AI-powered search, DSPy optimization, multi-provider LLM support, and local processing with no external API dependencies required.
Problem: Need intelligent document analysis with flexible AI provider options and reliable formatting
Solution: Complete RAG pipeline with DSPy optimization, multi-provider LLM support, and modern web interface
1. Create .env.prod file:
POSTGRES_DB=docurag
POSTGRES_USER=docurag_user
POSTGRES_PASSWORD=your_secure_password
DATABASE_URL=postgresql://docurag_user:your_secure_password@postgres:5432/docurag
SECRET_KEY=your-super-secret-key-here
ENVIRONMENT=production
CORS_ORIGINS=http://localhost,http://127.0.0.1
OLLAMA_URL=http://ollama:11434
OLLAMA_MODEL=llama3.2:1b
2. Create docker-compose.yml file:
services:
postgres:
image: postgres:15-alpine
container_name: docurag_postgres
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 30s
timeout: 10s
retries: 3
restart: unless-stopped
ollama:
image: ollama/ollama:latest
container_name: docurag_ollama
volumes:
- ollama_data:/root/.ollama
ports:
- "11434:11434"
environment:
- OLLAMA_HOST=0.0.0.0
healthcheck:
test: ["CMD", "ollama", "list"]
interval: 30s
timeout: 10s
retries: 3
restart: unless-stopped
docurag:
image: alokdekadev/docurag:latest
container_name: docurag_app
ports:
- "80:80"
environment:
- DATABASE_URL=${DATABASE_URL}
- SECRET_KEY=${SECRET_KEY}
- OLLAMA_URL=${OLLAMA_URL}
- OLLAMA_MODEL=${OLLAMA_MODEL}
- ENVIRONMENT=${ENVIRONMENT}
- CORS_ORIGINS=${CORS_ORIGINS}
volumes:
- docurag_uploads:/app/uploads
- docurag_chroma:/app/chroma_db
depends_on:
postgres:
condition: service_healthy
ollama:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/health"]
interval: 30s
timeout: 10s
retries: 3
restart: unless-stopped
volumes:
postgres_data:
ollama_data:
docurag_uploads:
docurag_chroma:
networks:
default:
name: docurag_network
3. Start everything:
docker compose --env-file .env.prod up -d
4. Download the AI model:
docker compose exec ollama ollama pull llama3.2:1b
5. Access the application at http://localhost
React Frontend → Nginx Proxy → FastAPI Backend → PostgreSQL Database
↓ ↓
ChromaDB Vector Store → Multi-Provider LLMs
↓ (Ollama/OpenAI/Anthropic/Google/Groq)
DSPy Enhancement Pipeline
# Start services
docker compose --env-file .env.prod up -d
# Stop services
docker compose down
# View logs
docker compose logs -f docurag
# Check status
docker compose ps
alokdekadev/docurag:latest (Unified container with DSPy)postgres:15-alpineollama/ollama:latestllama3.2:1b (~1.3GB)React • FastAPI • PostgreSQL • ChromaDB • DSPy • Ollama • OpenAI • Anthropic • Google • Groq • Nginx • Docker
Content type
Image
Digest
sha256:ddb3593f4…
Size
888.9 MB
Last updated
about 1 year ago
docker pull alokdekadev/docurag