updates frontend and backend

This commit is contained in:
sriram
2026-08-11 19:11:32 +05:30
parent 77d8536941
commit dbfe347bab
11 changed files with 21 additions and 337 deletions

View File

@@ -12,6 +12,16 @@ documentation (`docs/`). This file is just a fast local reference.
## Quick start
### One-click (Windows)
Double-click **`start_backend.bat`**. It picks up `venv\Scripts\python.exe`
if present (else falls back to system `python`), starts/creates the
`catalog_rag_postgres` Docker container from `docker-compose.yml`,
launches Ollama in the background if it's installed but not running,
seeds sample data if needed, then starts uvicorn on port 8000.
### Manual
```bash
cd backend
python3 -m venv .venv
@@ -23,7 +33,7 @@ cp .env.example .env # then edit DB_PASSWORD etc.
# Option A: already have a Postgres+pgvector catalog from the old project?
# Just point .env at it (DB_HOST/DB_PORT/DB_NAME/DB_USER/DB_PASSWORD) - done.
# Option B: starting fresh locally?
docker compose -f ../docker-compose.yml up -d
docker compose -f docker-compose.yml up -d
python scripts/seed_sample_data.py # loads bundled sample catalogs instantly
uvicorn app.main:app --reload --port 8000

View File

@@ -0,0 +1,38 @@
# Optional: one-command local Postgres + pgvector for development.
#
# If you already have a Postgres + pgvector instance running somewhere
# (e.g. a managed/remote server you used with the original project), you
# do NOT need this - just point backend/.env at it instead.
#
# Ollama is intentionally NOT included here: install it natively on the
# host (see docs) so it can use your CPU efficiently without an extra
# container layer, and so `ollama pull` model files persist outside Docker.
#
# Usage:
# docker compose up -d
# # then in backend/.env: DB_HOST=localhost, DB_PORT=5432, DB_NAME=pgvector,
# # DB_USER=postgres, DB_PASSWORD=<the value you set below>
services:
postgres:
image: pgvector/pgvector:pg16
container_name: catalog_rag_postgres
restart: unless-stopped
environment:
POSTGRES_DB: pgvector
POSTGRES_USER: postgres
# Override this in a local .env file next to this compose file
# (docker compose auto-loads .env) or export POSTGRES_PASSWORD
# before running `docker compose up`. Do not commit a real value.
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
ports:
- "5432:5432"
volumes:
- catalog_rag_pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 10
volumes:
catalog_rag_pgdata: