Spaces:
Runtime error
Runtime error
|
Download external-services-setup.md from BTankut/Context-Store-LLM: direct link, hf CLI and curl.
- Browser
- Download file 2.57 kB
-
https://huggingface.co/spaces/BTankut/Context-Store-LLM/resolve/main/external-services-setup.md
- Command line
-
hf download hf://spaces/BTankut/Context-Store-LLM/external-services-setup.md
-
curl -L -o external-services-setup.md https://huggingface.co/spaces/BTankut/Context-Store-LLM/resolve/main/external-services-setup.md
2.57 kB
Context Store - External Services Setup
Required External Services
To deploy Context Store without local dependencies, set up these cloud services:
1. PostgreSQL Database
Recommended: Neon (Free tier available)
- Go to https://neon.tech
- Create account and new project
- Copy connection string
- Set
DATABASE_URLandDIRECT_URLto the same value
Alternative: Supabase
- Go to https://supabase.com
- Create project
- Get connection string from Settings > Database
2. Neo4j Knowledge Graph
Neo4j Aura (Free tier available)
- Go to https://neo4j.com/cloud/aura/
- Create free account
- Create database instance
- Copy connection URI, username, password
- Set
NEO4J_URI,NEO4J_USERNAME,NEO4J_PASSWORD
3. Redis Cache
Recommended: Upstash Redis (Free tier available)
- Go to https://upstash.com
- Create Redis database
- Copy connection details
- Set
REDIS_HOST,REDIS_PORT,REDIS_PASSWORD
Alternative: Redis Cloud
- Go to https://redis.com/redis-enterprise-cloud/
- Create database
- Get connection details
4. Environment Variables
Create .env file with these values:
# PostgreSQL (from Neon/Supabase)
DATABASE_URL=postgresql://username:password@hostname:port/database
DIRECT_URL=postgresql://username:password@hostname:port/database
# Neo4j (from Aura)
NEO4J_URI=neo4j+s://your-instance.databases.neo4j.io
NEO4J_USERNAME=neo4j
NEO4J_PASSWORD=your-password
# Redis (from Upstash)
REDIS_HOST=your-redis.upstash.io
REDIS_PORT=6379
REDIS_PASSWORD=your-password
# Required APIs
OPENAI_API_KEY=sk-your-key
TRIGGER_PROJECT_ID=proj_gtuachiolvvekkzclssn
TRIGGER_SECRET_KEY=tr_dev_your-key
# App Security
SESSION_SECRET=your-long-random-string-at-least-32-chars
ENCRYPTION_KEY=your-32-character-encryption-key-here
# HuggingFace Deployment
PORT=7860
NODE_ENV=production
HOST=0.0.0.0
5. Quick Setup Commands
After setting up external services:
# Deploy to HuggingFace
git add .
git commit -m "External services configuration"
git push origin main
# Create HuggingFace Space
# 1. Go to https://huggingface.co/spaces
# 2. Click "Create new Space"
# 3. Choose Docker SDK
# 4. Connect your GitHub repo
# 5. Add environment variables in Space settings
Service Costs (Free Tiers)
- Neon PostgreSQL: 500MB storage free
- Neo4j Aura: 200k nodes + 400k relationships free
- Upstash Redis: 10k commands/day free
- HuggingFace Spaces: Free for public spaces
- Trigger.dev: 1000 runs/month free
Total: $0/month for development usage