Spaces:
Paused
Paused
Somrat Sorkar commited on
Commit Β·
644054d
1
Parent(s): 5365372
Remove legacy workspace-sync.sh, keep only Python sync
Browse filesFiles changed (4)
- Dockerfile+1-2
- README.md-1
- start.sh+1-6
- workspace-sync.shDeleted-40
36 unmodified lines37383940414243444536 unmodified linesCOPY --chown=1000:1000 health-server.js /home/node/app/health-server.jsCOPY --chown=1000:1000 start.sh /home/node/app/start.shCOPY --chown=1000:1000 keep-alive.sh /home/node/app/keep-alive.shCOPY --chown=1000:1000 workspace-sync.sh /home/node/app/workspace-sync.shCOPY --chown=1000:1000 workspace-sync.py /home/node/app/workspace-sync.pyRUN chmod +x /home/node/app/start.sh /home/node/app/keep-alive.sh /home/node/app/workspace-sync.shUSER node36 unmodified lines373839404142434436 unmodified linesCOPY --chown=1000:1000 health-server.js /home/node/app/health-server.jsCOPY --chown=1000:1000 start.sh /home/node/app/start.shCOPY --chown=1000:1000 keep-alive.sh /home/node/app/keep-alive.shCOPY --chown=1000:1000 workspace-sync.py /home/node/app/workspace-sync.pyRUN chmod +x /home/node/app/start.sh /home/node/app/keep-alive.shUSER node
369 unmodified lines370371372373374375376369 unmodified linesβββ start.sh # Config generator + validation + orchestratorβββ keep-alive.sh # Self-ping to prevent HF sleepβββ workspace-sync.py # Smart sync via huggingface_hub (with git fallback)βββ workspace-sync.sh # Legacy git-based sync (fallback)βββ health-server.js # Health endpoint (/health)βββ dns-fix.js # DNS override for HF network restrictionsβββ .env.example # Complete configuration reference369 unmodified lines370371372373374375369 unmodified linesβββ start.sh # Config generator + validation + orchestratorβββ keep-alive.sh # Self-ping to prevent HF sleepβββ workspace-sync.py # Smart sync via huggingface_hub (with git fallback)βββ health-server.js # Health endpoint (/health)βββ dns-fix.js # DNS override for HF network restrictionsβββ .env.example # Complete configuration reference
300 unmodified lines301302303304305306307308309310311312300 unmodified linesnode /home/node/app/health-server.js &/home/node/app/keep-alive.sh &# Use Python huggingface_hub sync if available, fallback to git-based syncif python3 -c "import huggingface_hub" 2>/dev/null; thenpython3 /home/node/app/workspace-sync.py &else/home/node/app/workspace-sync.sh &fi# ββ Launch gateway ββecho "π Launching OpenClaw gateway on port 7860..."300 unmodified lines301302303304305306307300 unmodified linesnode /home/node/app/health-server.js &/home/node/app/keep-alive.sh &python3 /home/node/app/workspace-sync.py &# ββ Launch gateway ββecho "π Launching OpenClaw gateway on port 7860..."
12345678910111213141516171819202122232425262728293031323334353637383940#!/bin/bash# Periodic workspace sync to HF Dataset# Commits and pushes workspace changes every SYNC_INTERVAL seconds# Runs as a background process alongside the gateway
INTERVAL="${SYNC_INTERVAL:-600}" # Default: every 10 minutesWORKSPACE="/home/node/.openclaw/workspace"
# Wait for workspace to be initializedsleep 30
if [ ! -d "$WORKSPACE/.git" ]; then echo "π Workspace sync: no git repo found, skipping." exit 0fi
echo "π Workspace sync started: syncing every ${INTERVAL}s"
while true; do sleep "$INTERVAL" cd "$WORKSPACE" || continue # Check if there are any changes git add -A 2>/dev/null if git diff --cached --quiet 2>/dev/null; then # No changes continue fi # Commit and push TIMESTAMP=$(date -u +%Y-%m-%dT%H:%M:%SZ) if git commit -m "Auto-sync ${TIMESTAMP}" 2>/dev/null; then if git push origin main 2>/dev/null; then echo "π Workspace sync: pushed changes (${TIMESTAMP})" else echo "π Workspace sync: commit ok, push failed (will retry)" fi fidoneDockerfile+1-2
README.md-1
start.sh+1-6
workspace-sync.shDeleted-40