Spaces:
Sleeping
Sleeping
Update sync_script.sh
Browse files12345678910111213141516171819202122#!/bin/bashmkdir -p /convex/datahuggingface-cli download leadshello/agent-ai --repo-type dataset --local-dir /convex/data --token $HF_TOKEN || echo "No DB found."# Start our Traffic Copnginx# Start Convexecho "Starting Convex Backend..."convex-local-backend /convex/data/db.sqlite3 &sleep 10echo "=========================================================="echo "YOUR MASTER PASSWORD IS:"./generate_admin_key.shecho "=========================================================="while true; dosleep 600huggingface-cli upload leadshello/agent-ai /convex/data . --repo-type dataset --token $HF_TOKENdone12345678910111213141516171819202122232425262728#!/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 existing DB found."# 2. Start the Nginx Traffic Copnginx# 3. Start the Convex engine safelycd /convex/dataecho "Starting Convex Backend..."convex-local-backend &# 4. Give the backend 10 seconds to wake upsleep 10# 5. Generate and print the keyecho "=========================================================="echo "YOUR MASTER PASSWORD IS:"cd / && ./generate_admin_key.shecho "=========================================================="# 6. Every 10 minutes, sync the database back to your Datasetwhile true; dosleep 600huggingface-cli upload leadshello/Agent-Ai /convex/data . --repo-type dataset --token $HF_TOKENdone
sync_script.sh+12-6