ruvector/examples/edge-net/relay/deploy.sh
rUv d32da2090f feat(edge-net): add real WASM integration, relay infrastructure, and consent UI
- Add EdgeNet service with real WASM module initialization from CDN
- Add PiKey cryptographic identity store with Ed25519 signatures
- Add IndexedDB persistence for credits, tasks, and settings
- Add ConsentWidget for CPU/GPU contribution with settings modal
- Add IdentityPanel for crypto identity management
- Add DocumentationPanel with comprehensive user guide
- Add SpecializedNetworks component for network communities
- Deploy Edge-Net Genesis Relay to Google Cloud Run with security:
  - Origin validation (CORS whitelist)
  - Rate limiting (100 msgs/min per node)
  - Message size limits (64KB)
  - Connection timeout (30s heartbeat)
  - Max 5 connections per IP
- Update Header with Edge-Net branding
- Update Sidebar with Docs tab
- Update networkStore to use real WASM stats
- Configure dashboard to connect to Genesis relay

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 16:41:07 +00:00

45 lines
1.2 KiB
Bash
Executable file

#!/bin/bash
# Deploy Edge-Net Relay to Google Cloud Run
set -e
PROJECT_ID="${GCP_PROJECT:-$(gcloud config get-value project)}"
REGION="${GCP_REGION:-us-central1}"
SERVICE_NAME="edge-net-relay"
echo "🚀 Deploying Edge-Net Relay to Cloud Run"
echo " Project: $PROJECT_ID"
echo " Region: $REGION"
# Enable required APIs
echo "📦 Enabling Cloud Run API..."
gcloud services enable run.googleapis.com --project=$PROJECT_ID
# Build and deploy
echo "🏗️ Building and deploying..."
gcloud run deploy $SERVICE_NAME \
--source . \
--project=$PROJECT_ID \
--region=$REGION \
--platform=managed \
--allow-unauthenticated \
--memory=256Mi \
--cpu=1 \
--min-instances=1 \
--max-instances=10 \
--timeout=3600 \
--session-affinity
# Get URL
URL=$(gcloud run services describe $SERVICE_NAME --region=$REGION --project=$PROJECT_ID --format='value(status.url)')
echo ""
echo "✅ Edge-Net Relay deployed successfully!"
echo "🌐 Relay URL: $URL"
echo ""
echo "📝 Add this to your dashboard's edgeNet.ts:"
echo ""
echo " const config = new this.module.EdgeNetConfig(id)"
echo " .addRelay('${URL/https/wss}')"
echo " .cpuLimit(0.5)"
echo " .build();"