Spaces:
Sleeping
Sleeping
Update sync_script.sh
Browse files12344566789910111211131415161718192016212223242526212728#!/bin/bash
# 1. Download existing DB from your Datasetmkdir -p /convex/datahuggingface-cli download leadshello/agent-ai --repo-type dataset --local-dir /convex/data --token $HF_TOKEN || echo "No DB found."huggingface-cli download leadshello/Agent-Ai --repo-type dataset --local-dir /convex/data --token $HF_TOKEN || echo "No existing DB found."
# Start our Traffic Cop# 2. Start the Nginx Traffic Copnginx
# Start Convex# 3. Start the Convex engine safelycd /convex/dataecho "Starting Convex Backend..."convex-local-backend /convex/data/db.sqlite3 &convex-local-backend &
# 4. Give the backend 10 seconds to wake upsleep 10
# 5. Generate and print the keyecho "=========================================================="echo "YOUR MASTER PASSWORD IS:"./generate_admin_key.shcd / && ./generate_admin_key.shecho "=========================================================="
# 6. Every 10 minutes, sync the database back to your Datasetwhile true; do sleep 600 huggingface-cli upload leadshello/agent-ai /convex/data . --repo-type dataset --token $HF_TOKEN huggingface-cli upload leadshello/Agent-Ai /convex/data . --repo-type dataset --token $HF_TOKENdonesync_script.sh+12-6