Spaces:
Runtime error
Runtime error
|
Download deploy-huggingface.md from BTankut/Context-Store-LLM: direct link, hf CLI and curl.
- Browser
- Download file 2.89 kB
-
https://huggingface.co/spaces/BTankut/Context-Store-LLM/resolve/main/deploy-huggingface.md
- Command line
-
hf download hf://spaces/BTankut/Context-Store-LLM/deploy-huggingface.md
-
curl -L -o deploy-huggingface.md https://huggingface.co/spaces/BTankut/Context-Store-LLM/resolve/main/deploy-huggingface.md
2.89 kB
Deploy Context Store to HuggingFace
Step 1: Setup External Services
Follow external-services-setup.md to configure:
- PostgreSQL (Neon.tech - Free)
- Neo4j (Aura - Free)
- Redis (Upstash - Free)
Step 2: Deploy to HuggingFace Spaces
Option A: Direct GitHub Integration
Create HuggingFace Space
https://huggingface.co/spaces β "Create new Space" β Name: context-store β SDK: Docker β Visibility: Public (Free) β Connect Repository: BTankut/Context-StoreConfigure Environment Variables In your Space settings, add:
DATABASE_URL=your_neon_postgresql_url DIRECT_URL=your_neon_postgresql_url NEO4J_URI=neo4j+s://your-aura-instance.databases.neo4j.io NEO4J_USERNAME=neo4j NEO4J_PASSWORD=your_neo4j_password REDIS_HOST=your-upstash-host.upstash.io REDIS_PORT=6379 REDIS_PASSWORD=your_upstash_password OPENAI_API_KEY=sk-your-openai-key TRIGGER_PROJECT_ID=proj_gtuachiolvvekkzclssn TRIGGER_SECRET_KEY=tr_dev_your_trigger_key SESSION_SECRET=your-random-32-char-secret ENCRYPTION_KEY=your-32-char-encryption-keyTrigger Deployment
git add . git commit -m "Ready for HuggingFace deployment" git push origin main
Option B: Direct Upload
Prepare Files
# Create deployment archive tar --exclude=node_modules --exclude=.git -czf context-store.tar.gz .Upload to HuggingFace
- Create Space manually
- Upload
context-store.tar.gz - Extract and configure environment variables
Step 3: Access Your Deployed App
- URL:
https://your-username-context-store.hf.space - Health Check:
https://your-username-context-store.hf.space/health - API:
https://your-username-context-store.hf.space/api/v1/search?q=test
Step 4: Setup MCP Access
After successful deployment, connect from any device:
# Install Claude Code on any device
claude mcp add context-store https://your-username-context-store.hf.space
This gives you universal access to your Context Store memory from all devices without local setup.
Troubleshooting
Database Connection Issues
- Verify environment variables in Space settings
- Check database service status (Neon/Aura/Upstash)
- Test connection strings locally first
Build Failures
- Check HuggingFace build logs
- Ensure Dockerfile.hf is present
- Verify pnpm-lock.yaml compatibility
Trigger.dev Issues
- Use development environment initially
- Prisma bundling issues are handled by excluding problematic files
- Simple test tasks work without Prisma
Success Criteria
β
Web interface accessible at HuggingFace URL
β
Health check returns 200 OK
β
API endpoints respond correctly
β
Database connections established
β
MCP server accessible from Claude Code
β
No local dependencies required