SearXNG / deploy.sh
Peterase's picture
Initial SearXNG deployment for ARKI AI - Optimized for news search with 10 fast engines, 2-3s response time, JSON API, no rate limits
3c1ff17
#!/bin/bash
# SearXNG Deployment Script for Hugging Face Spaces
# Usage: ./deploy.sh
set -e
echo "πŸš€ Deploying SearXNG to Hugging Face Spaces"
echo "=============================================="
# Check if git is installed
if ! command -v git &> /dev/null; then
echo "❌ Error: git is not installed"
exit 1
fi
# Check if we're in the right directory
if [ ! -f "Dockerfile" ]; then
echo "❌ Error: Dockerfile not found. Are you in the searxng-hf-space directory?"
exit 1
fi
# Initialize git if not already initialized
if [ ! -d ".git" ]; then
echo "πŸ“¦ Initializing git repository..."
git init
else
echo "βœ… Git repository already initialized"
fi
# Add all files
echo "πŸ“ Adding files to git..."
git add .
# Check if there are changes to commit
if git diff --staged --quiet; then
echo "ℹ️ No changes to commit"
else
# Commit changes
echo "πŸ’Ύ Committing changes..."
git commit -m "Deploy SearXNG for ARKI AI
- Optimized for news search
- 10 fast news engines configured
- 2-3s average response time
- JSON API enabled
- No rate limits
- Privacy-focused configuration
Deployment: $(date '+%Y-%m-%d %H:%M:%S')"
fi
# Check if remote exists
if git remote | grep -q "origin"; then
echo "βœ… Remote 'origin' already configured"
else
echo "πŸ”— Adding Hugging Face remote..."
git remote add origin https://huggingface.co/spaces/Peterase/SearXNG
fi
# Push to Hugging Face
echo "⬆️ Pushing to Hugging Face Spaces..."
echo ""
echo "⚠️ You may be prompted for your Hugging Face credentials:"
echo " Username: Peterase"
echo " Password: Your HF access token (from https://huggingface.co/settings/tokens)"
echo ""
git push -u origin main
echo ""
echo "=============================================="
echo "βœ… Deployment complete!"
echo ""
echo "πŸ“ Your SearXNG instance will be available at:"
echo " https://peterase-searxng.hf.space"
echo ""
echo "⏳ Build time: ~5-10 minutes"
echo ""
echo "πŸ” Check build status:"
echo " https://huggingface.co/spaces/Peterase/SearXNG/logs"
echo ""
echo "πŸ§ͺ Test after deployment:"
echo " python test_searxng.py"
echo ""
echo "=============================================="