A complete Retrieval-Augmented Generation (RAG) setup running locally with Docker Compose.
- Ollama - Local embeddings using
mxbai-embed-large - PostgreSQL + pgvector - Vector database for semantic storage
- Flask Web App - Simple interface to store and search documents
- Docker Compose - Orchestrates all services
- Docker & Docker Compose installed
- At least 4GB free disk space (for models and data)
docker compose up --buildOpen your browser to: http://localhost:8000
docker exec -it rag_ollama ollama pull mxbai-embed-large- 8000: Web application
- 11434: Ollama API
- 5432: PostgreSQL database
CREATE TABLE documents (
id SERIAL PRIMARY KEY,
text TEXT,
embedding VECTOR(1024) -- mxbai-embed-large produces 1024-dim vectors
);