feat(cluster): deploy browser WebSocket + CORS to the 3-node cluster
Roll the --ws-port + --cors-origins flags (issue uniweb/0001) out to the unibus cluster so the browser-native uniweb client can reach the data plane (nats.ws) and the control plane (CORS) on every node. The WS reuses the data-plane TLS (wss://) and the same origin allowlist. Per-node WS port override (WS_PORT_<NAME>): magnus runs unibus_admin on 127.0.0.1:8480, so the bus WS binds 8485 there to avoid a crash-loop; homer and datardos keep 8480. deploy-cluster.sh also gains DEPLOY_ONLY=<name> for rolling one node at a time. Rolled out and verified 2026-06-13: all three nodes healthy, WS reachable, CORS 204, cluster quorum (R3) intact throughout.
This commit is contained in:
@@ -23,6 +23,19 @@ NATS_CLIENT_PORT=4250
|
||||
NATS_ROUTE_PORT=6250
|
||||
HTTP_PORT=8470
|
||||
|
||||
# Browser data-plane: WebSocket listener so the browser-native uniweb client
|
||||
# (nats.ws) reaches NATS, and the CORS allowlist for its calls to the control
|
||||
# plane. WS reuses the data-plane TLS, so it serves wss:// (the cluster runs with
|
||||
# TLS). CORS_ORIGINS is a comma-separated list of allowed browser origins (no
|
||||
# spaces). Issue uniweb/0001. The node's firewall must allow WS_PORT.
|
||||
WS_PORT=8480
|
||||
# Per-node WS port override (WS_PORT_<NAME>). magnus runs unibus_admin on
|
||||
# 127.0.0.1:8480, so the bus WebSocket cannot bind 0.0.0.0:8480 there — it would
|
||||
# crash-loop. magnus therefore serves the browser WS on 8485; homer and datardos
|
||||
# keep 8480 (no admin panel). Verified during the 2026-06-13 rollout.
|
||||
WS_PORT_MAGNUS=8485
|
||||
CORS_ORIGINS="http://localhost:5173"
|
||||
|
||||
# Remote install layout and SSH login user.
|
||||
REMOTE_DIR="/opt/unibus"
|
||||
SSH_USER="root"
|
||||
|
||||
Reference in New Issue
Block a user