Create entrypoint.sh
Browse files123456789101112131415161718#!/bin/bash
# 1. Start Cloudflare Tunnel in the background# We use the TUNNEL_TOKEN secret configured in HF Spaces settingsif [ -z "$TUNNEL_TOKEN" ]; then echo "WARNING: TUNNEL_TOKEN not found. External access via Cloudflare will be unavailable."else echo "Starting Cloudflare Tunnel..." cloudflared tunnel --no-autoupdate run --token $TUNNEL_TOKEN &fi
# 2. Start the IDE (code-server)# We bind to 0.0.0.0:7860 so the HF proxy can still see itecho "Starting Agent-1st IDE on port 7860..."code-server --bind-addr 0.0.0.0:7860 \ --auth none \ --disable-telemetry \ /home/puppet/agent_workspaceentrypoint.shAdded+18