interactive: true
rqlited -auth=auth.json -extensions-path="${SQLITE_VEC_PATH}" ~/ragserverinteractive: true
rqlite --user='admin:secret'migrate create -ext sql -dir db/migrations -seq create_documents_tablego test ./...ENV: RQLITE_URL=http://admin:secret@localhost:4001
go run ./cmd/ragserver/ serve --rqlite-url "http://admin:secret@localhost:4001"interactive: true
go run ./cmd/ragserver/ import --collection "entities" --expand "contacts,tags,dependsOn,dependsOn.contacts,dependsOn.tags,contributesTo,contributesTo.contacts,contributesTo.tags" --rag-server-api-key "test-api-key"interactive: true
go run ./cmd/ragserver/ import --collection "entities" --expand "contacts,tags,dependsOn,dependsOn.contacts,dependsOn.tags,contributesTo,contributesTo.contacts,contributesTo.tags" --dry-run --id 1umn2j19hi2bjrwinteractive: true
go run ./cmd/ragserver context --text="What is the plan to destroy the Death Star?" --rag-server-api-key="test-api-key" --pretty=falseinteractive: true
go run ./cmd/ragserver chat --rag-server-api-key="test-api-key"interactive: true
go run ./cmd/ragserver query -q "What is the plan to destroy the Death Star?" --rag-server-api-key="test-api-key"interactive: true
go run ./cmd/ragserver query --no-context -q "What is the plan to destroy the Death Star?"gomod2nixnix buildnix runnix developnix build .#packages.aarch64-linux.docker-imagenix build .#packages.x86_64-linux.docker-imageenv: CONTAINER_REGISTRY=ghcr.io/ragserver
nix build .#packages.x86_64-linux.docker-image
cp ./result /tmp/ragserver.tar.gz
gunzip -f /tmp/ragserver.tar.gz
crane push /tmp/ragserver.tar ${CONTAINER_REGISTRY}/ragserver:v0.0.1Once you've built the image, you can load it into a local Docker daemon with docker load.
docker load < resultdocker run -p 8080:8080 app:latestnix build .#packages.aarch64-linux.rqlite-docker-imagenix build .#packages.x86_64-linux.rqlite-docker-imageenv: CONTAINER_REGISTRY=ghcr.io/ragserver
nix build .#packages.x86_64-linux.rqlite-docker-image
cp ./result /tmp/rqlite.tar.gz
gunzip -f /tmp/rqlite.tar.gz
crane push /tmp/rqlite.tar ${CONTAINER_REGISTRY}/rqlite:v0.0.1Once you've built the image, you can load it into a local Docker daemon with docker load.
docker load < resultdocker run -v "$PWD/auth.json:/mnt/rqlite/auth.json" -v "$PWD/.rqlite:/mnt/data" -p 4001:4001 -p 4002:4002 -p 4003:4003 rqlite:latestkubectl create namespace ragserverNeed to create auth.json as a k8s secret.
kubectl -n ragserver create secret generic rqlite-auth --from-file=auth.json
kubectl -n ragserver create secret generic ragserver-apikeys --from-file=apikeys.jsonLocal k8s requires a volume to store data. In a cloud provider, this will likely already exists.
envsubst < k8s/local/volume.yaml | kubectl --namespace ragserver apply -f -env: CONTAINER_REGISTRY=ghcr.io/ragserver dir: k8s interactive: true
for f in *.yaml; do envsubst < $f | kubectl apply --namespace ragserver -f -; doneOnce the application is deployed, we need to expose the ports in the k8s pods to the local machine. After this, the application will be available at localhost:9020.
kubectl port-forward service/ragserver 9020:9020 -n ragserverkubectl logs -n ragserver -l service=ragserverkubectl logs -n ragserver -l service=rqlite