Merge commit 'd803bfe2b1fe7f5e219e50ac20d6801a0a58ac75' as 'vendor/ruvector'
This commit is contained in:
45
vendor/ruvector/examples/edge-net/relay/deploy.sh
vendored
Executable file
45
vendor/ruvector/examples/edge-net/relay/deploy.sh
vendored
Executable file
@@ -0,0 +1,45 @@
|
||||
#!/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();"
|
||||
Reference in New Issue
Block a user