NathanPereira's picture
Upload 7 files
9ccd45c verified
Raw
History Blame Contribute Delete
718 Bytes
#!/usr/bin/env bash
set -euo pipefail
# Free tier = ephemeral disk. Everything under these paths is wiped on restart,
# so we rebuild the vector store on every boot. Keep this idempotent.
export QDRANT_PATH="${QDRANT_PATH:-/home/user/qdrant_data}"
export SQLITE_PATH="${SQLITE_PATH:-/home/user/app.db}"
mkdir -p "$QDRANT_PATH"
echo "[startup] Rebuilding vector store (ephemeral disk, no persistence)..."
# This should ingest your seed docs into embedded Qdrant. Make it safe to re-run.
python -m backend.ingest || {
echo "[startup] Ingestion failed — starting app anyway (empty index)."
}
echo "[startup] Launching FastAPI on 0.0.0.0:7860"
exec uvicorn backend.main:app --host 0.0.0.0 --port 7860 --workers 1