@@ -246,6 +246,9 @@ echo "Reserved static public IP for WebSocket: $WS_INGRESS_IP"
246
246
# Prepare and apply deployment manifest
247
247
echo " Preparing deployment manifest..."
248
248
export DOCKER_IMAGE_NAME DOCKER_IMAGE_TAG FORCE_REVISION_TIMESTAMP AZURE_BROWSERLESS_SERVICE_NAME
249
+ # Add container command and Vercel environment variables
250
+ export CONTAINER_CMD=" /app/server/scripts/start-ws-server.sh --prod --cloud"
251
+ export VERCEL_TOKEN VERCEL_ORG_ID VERCEL_PROJECT_ID
249
252
cat k8s/deployment.yaml | envsubst > deployment.yaml
250
253
echo " Applying deployment manifest..."
251
254
kubectl apply -f deployment.yaml || {
@@ -649,3 +652,18 @@ echo " kubectl logs -n ingress-nginx -l app.kubernetes.io/component=controll
649
652
echo " "
650
653
echo " 4. Test internal connectivity:"
651
654
echo " kubectl run -i --tty --rm debug --image=curlimages/curl --restart=Never -- curl -v http://${AZURE_BROWSERLESS_SERVICE_NAME} :50000"
655
+
656
+ # Add WebSocket fallback strategy
657
+ echo " "
658
+ echo " For WebSocket connectivity issues, consider these options:"
659
+ echo " 1. Continue using the ingress WSS connection: wss://ws.${AZURE_DOMAIN_NAME} "
660
+ echo " 2. Use direct WebSocket connection: ws://${WS_SERVICE_IP} :50000"
661
+ echo " "
662
+ echo " Alternative DNS configuration for more reliable WebSocket connections:"
663
+ echo " You can point the ws.${AZURE_DOMAIN_NAME} domain directly to the dedicated WebSocket service:"
664
+ if [ " $WS_SERVICE_IP " != " Not found" ]; then
665
+ echo " - Update your DNS for ws.${AZURE_DOMAIN_NAME} to point to: ${WS_SERVICE_IP} "
666
+ echo " - Use the ws:// protocol instead of wss:// (direct WebSocket service doesn't use TLS)"
667
+ else
668
+ echo " - WebSocket service IP not found. Check with: kubectl get service browserless-websocket"
669
+ fi
0 commit comments