Skip to content

Latest commit

 

History

History
54 lines (38 loc) · 1.53 KB

File metadata and controls

54 lines (38 loc) · 1.53 KB

Deployment

Local development

Backend

cd backend
python -m venv .venv
source .venv/bin/activate   # or .venv\Scripts\activate on Windows
pip install -r requirements.txt
cp ../.env.example .env    # set OPENAI_API_KEY as per the instruction
mkdir -p data/uploads data/chroma
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000

API: http://localhost:8000
Docs: http://localhost:8000/docs

Frontend

cd frontend
npm install
npm run dev

App: http://localhost:3000 (proxies /api to backend).


Docker (local)

From project root:

cp .env.example .env
# Optionally set OPENAI_API_KEY in .env
docker compose up --build

Data is persisted in the rag_data volume.


Cloud deployment notes

  • Backend: Run the backend container on any host (e.g. Render, Railway, ECS). Set env vars (OPENAI_API_KEY, UPLOAD_DIR, CHROMA_PERSIST_DIR, SQLITE_PATH). Use a persistent volume or external DB/vector store for production.
  • Frontend: Build with npm run build and serve the dist/ folder (e.g. Vercel, S3+CloudFront). Set VITE_API_BASE or equivalent to the backend URL if not using same-origin proxy.
  • Vector DB: For scale, replace ChromaDB with Pinecone/Weaviate/Qdrant via the existing abstraction in VectorStoreService and EmbeddingService.
  • Auth: Add API keys or OAuth in frontend and backend; protect /documents/upload and /query endpoints.