Files
simbarag/startup-dev.sh
T
ryan 438399646f Replace ChromaDB with pgvector for vector storage
Consolidate onto PostgreSQL by using pgvector instead of a separate
ChromaDB instance. This removes a Docker volume, a large dependency,
and simplifies the stack without meaningful performance impact at
our document scale.

- Swap langchain-chroma for langchain-postgres (PGVector)
- Use pgvector/pgvector:pg16 Docker image with init script
- Lazy-initialize vector store to avoid eager DB connections
- Add SQL helpers for stats/delete/list (replacing _collection access)
- Remove legacy main.py, chunker, petmd scraper, and /api/query endpoint

Re-index required after deploy (POST /api/rag/index + /index-obsidian).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-24 08:43:52 -04:00

23 lines
482 B
Bash
Executable File

#!/bin/bash
set -e
echo "Rebuilding frontend..."
cd /app/raggr-frontend
yarn build
cd /app
echo "Setting up database..."
# Give PostgreSQL a moment to be ready (healthcheck in docker-compose handles this)
sleep 3
if ls migrations/models/0_*.py 1> /dev/null 2>&1; then
echo "Running database migrations..."
aerich upgrade
else
echo "No migrations found, initializing database..."
aerich init-db
fi
echo "Starting Flask application in debug mode..."
python app.py