|
Download docs/deployment.md from Prerna43/ai: direct link, hf CLI and curl.
- Browser
- Download file 1.7 kB
-
https://huggingface.co/spaces/Prerna43/ai/resolve/main/docs/deployment.md
- Command line
-
hf download hf://spaces/Prerna43/ai/docs/deployment.md
-
curl -L -o deployment.md https://huggingface.co/spaces/Prerna43/ai/resolve/main/docs/deployment.md
1.7 kB
| # Deployment | |
| This project is configured for a local app container with Qdrant Cloud and local NetworkX graph files. | |
| ## Local App With Cloud Databases | |
| Copy environment variables: | |
| ```powershell | |
| Copy-Item .env.example .env | |
| ``` | |
| Fill in the required secrets, then run: | |
| ```powershell | |
| docker compose up --build | |
| ``` | |
| Services: | |
| - Backend: `http://localhost:8000` | |
| - Backend docs: `http://localhost:8000/docs` | |
| - Frontend: `http://localhost:8501` | |
| Your `.env` should point to cloud databases: | |
| ```env | |
| QDRANT_URL=https://your-qdrant-cloud-cluster-url | |
| QDRANT_API_KEY=your_qdrant_cloud_api_key | |
| ``` | |
| Backup local Docker Compose values: | |
| ```env | |
| # QDRANT_URL=http://qdrant:6333 | |
| ``` | |
| Dependency graphs are stored locally under `data/graphs/*.json`, so Neo4j is not required. The local Qdrant service definition is kept as comments in `docker-compose.yml`; uncomment it only if you want offline/local vector storage again. | |
| ## Public Deployment | |
| For a public deployed link, do not point the backend at databases on your laptop. Use reachable services: | |
| ```env | |
| QDRANT_URL=https://your-qdrant-cloud-url | |
| QDRANT_API_KEY=your_qdrant_key | |
| GEMINI_API_KEY=your_gemini_key | |
| ``` | |
| Recommended setup: | |
| - Deploy backend as a container. | |
| - Deploy frontend as a Streamlit service or separate container. | |
| - Use Qdrant Cloud for vectors. | |
| - Persist `data/graphs` if you need graph data to survive container rebuilds. | |
| - Store all keys as platform secrets. | |
| ## CI/CD | |
| The GitHub Actions workflow in `.github/workflows/ci.yml` performs: | |
| - Python dependency installation | |
| - Python syntax compilation | |
| - Optional tests | |
| - Backend Docker image build | |
| - Frontend Docker image build | |
| Add deploy steps for your platform after the build jobs pass. | |