Spaces:
Paused

IDE / entrypoint.sh
D300274's picture
Create entrypoint.sh
ff35c21 verified
Raw History Blame Contribute Delete
624 Bytes
#!/bin/bash
# 1. Start Cloudflare Tunnel in the background
# We use the TUNNEL_TOKEN secret configured in HF Spaces settings
if [ -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 it
echo "Starting Agent-1st IDE on port 7860..."
code-server --bind-addr 0.0.0.0:7860 \
--auth none \
--disable-telemetry \
/home/puppet/agent_workspace