Minimal-yet-realistic RAG lab on Kotlin + Spring Boot 3 (WebFlux) with Solr 9.6 (BM25 + HNSW vectors) and native Ollama.
- macOS with Docker Desktop
- JDK 21 (Temurin recommended) — used in container build; local build uses Gradle wrapper
- Ollama (native) running on host: http://localhost:11434
- Docker Compose v2
- (Optional) External Solr: http://localhost:8983
# Generation model(s)
ollama pull llama3
# Embeddings model
ollama pull nomic-embed-textsolr-rag-lab/
├─ infra/
│ ├─ docker-compose.yml # base: search-service only
│ └─ docker-compose.solr.yml # override: adds Solr and healthy depends
└─ services/
└─ search-service/
├─ Dockerfile # Temurin 21 multi-stage
├─ build.gradle.kts
└─ src/main|test/...
- macOS with Docker Desktop (or Docker Engine)
- Docker Compose v2
- JDK 21 (Temurin recommended) for local runs
- Gradle wrapper (provided)
From repo root:
./gradlew :services:search-service:bootRunCheck health:
curl -s http://localhost:8080/health | jq
# -> { "ok": true, "service": "search-service", "timestamp": "2025-10-02T20:10:00Z" }Alternatively (Actuator):
curl -s http://localhost:8080/actuator/healthBuild and run the container:
docker compose -f infra/docker-compose.yml up --buildHealth:
curl -s http://localhost:8080/health
curl -s http://localhost:8080/actuator/healthStop & clean:
docker compose -f infra/docker-compose.yml down -vCurrent service runs with defaults:
- SERVER_PORT (optional): override server port
- Other RAG configs (e.g., SOLR_URL, OLLAMA_BASE_URL) are not used yet
Create
.env(optional) nearinfra/docker-compose.yml:
SERVER_PORT=8080- GET /health
Returns JSON with simple service liveness.
- GET /actuator/health
Spring Boot Actuator health.
Example:
curl -s http://localhost:8080/health | jq