manifests: align bridge-ui with Vite SPA (ghcr.io/hanzoai/spa, :80)

bridge-ui ships as a prebuilt Vite SPA inside ghcr.io/hanzoai/spa
(see app/bridge/Dockerfile final stage), not a Next.js dev container.
The compose + k8s manifests were still describing the old Next shape:
containerPort 3000, `npm run dev`, /app/.next volume mount, and
NEXT_PUBLIC_* env vars. None of that exists in the image anymore.

- compose.testnet.yml / compose.mainnet.yml: port 3001:80 (was 3001:3000);
  drop command + .next mount; swap NEXT_PUBLIC_* for VITE_BRIDGE_* env
  (the names app/bridge/src/bridge.config.ts reads).
- k8s/mpc-deployment.yaml: containerPort 80 (was 3000); Service
  targetPort 80 (was 3000 — broken since the static-SPA cutover); swap
  NEXT_PUBLIC_* for VITE_BRIDGE_* on the Deployment env.
- compose.yml: keep local hot-reload UX by mounting the repo root and
  running `pnpm -C app/bridge dev --host 0.0.0.0 --port 3001` against
  node:22-alpine. Dev port moves 3000 -> 3001 to match the published
  SPA convention across envs.
- scripts/start-local.sh: update printed UI URL to :3001.

compose.infra.yml and compose.local.yml don't define bridge-ui — left
untouched. scripts/launch-mpc-bridge.sh already prints :3001 and has no
Next-specific config; check-ci-status.sh only references bridge-ui as a
GHCR package name (image preserved per spec). Both verified clean.

Validated:
- docker compose -f compose.{yml,testnet,mainnet,infra,local}.yml config -q
- kubectl --dry-run=client apply -f k8s/mpc-deployment.yaml
This commit is contained in:
2026-05-21 16:34:08 -07:00
parent 7055cff082
commit 840e5323e4
5 changed files with 44 additions and 39 deletions
+8 -6
View File
@@ -256,18 +256,20 @@ services:
cpus: '2'
memory: 4G
# Bridge UI with CDN-ready config
# Bridge UI - Mainnet — Vite SPA (ghcr.io/hanzoai/spa serves /dist on :80).
# VITE_BRIDGE_* env documents what the image was built with; the values
# become real only when baked at build time (app/bridge/Dockerfile).
bridge-ui:
image: ghcr.io/luxfi/bridge-ui:latest
container_name: bridge-ui
restart: always
environment:
- NEXT_PUBLIC_API_URL=https://bridge-api.lux.network
- NEXT_PUBLIC_CHAIN_ENV=mainnet
- NEXT_PUBLIC_ENABLE_ANALYTICS=true
- NEXT_PUBLIC_GA_ID=${GA_ID}
- VITE_BRIDGE_API_HOST=https://bridge-api.lux.network
- VITE_BRIDGE_ENV=mainnet
- VITE_BRIDGE_CLIENT_ID=lux-bridge
- VITE_BRIDGE_IAM_ORG=lux-network
ports:
- "3001:3000"
- "3001:80"
networks:
- bridge-network
depends_on:
+8 -6
View File
@@ -208,18 +208,20 @@ services:
timeout: 5s
retries: 3
# Bridge UI - Testnet
# Bridge UI - Testnet — Vite SPA (ghcr.io/hanzoai/spa serves /dist on :80).
# VITE_BRIDGE_* env documents what the image was built with; the values
# become real only when baked at build time (app/bridge/Dockerfile).
bridge-ui:
image: ghcr.io/luxfi/bridge-ui:latest
container_name: bridge-ui
restart: always
environment:
- NEXT_PUBLIC_API_URL=https://bridge-api-testnet.lux.network
- NEXT_PUBLIC_CHAIN_ENV=testnet
- NEXT_PUBLIC_ENABLE_TEST_MODE=true
- NEXT_PUBLIC_SHOW_FAUCET=true
- VITE_BRIDGE_API_HOST=https://bridge-api-testnet.lux.network
- VITE_BRIDGE_ENV=testnet
- VITE_BRIDGE_CLIENT_ID=lux-bridge
- VITE_BRIDGE_IAM_ORG=lux-network
ports:
- "3001:3000"
- "3001:80"
networks:
- bridge-network
depends_on:
+16 -15
View File
@@ -154,32 +154,33 @@ services:
- /app/node_modules
command: npm run dev
# Bridge UI
# Bridge UI — Vite SPA. Local-dev compose mounts host source and runs
# `pnpm dev` on port 3001 for hot-reload. Built image (ghcr.io/luxfi/
# bridge-ui:latest) is `ghcr.io/hanzoai/spa` serving prebuilt /dist on
# port 80 — used by compose.testnet.yml / compose.mainnet.yml / k8s.
# node:22-alpine matches app/bridge/Dockerfile build stage.
bridge-ui:
image: ghcr.io/luxfi/bridge-ui:latest
image: node:22-alpine
container_name: bridge-ui
working_dir: /app/app/bridge
environment:
- NEXT_PUBLIC_API_URL=http://localhost:5000
- NEXT_PUBLIC_CHAIN_ENV=local
# Lux ID (Casdoor) Authentication
- NEXT_PUBLIC_AUTH_PROVIDER=casdoor
- NEXT_PUBLIC_CASDOOR_ENDPOINT=http://localhost:8000
- NEXT_PUBLIC_CASDOOR_CLIENT_ID=lux-bridge
- NEXT_PUBLIC_CASDOOR_ORGANIZATION=lux-network
- NEXT_PUBLIC_CASDOOR_APPLICATION=bridge
- NEXT_PUBLIC_CASDOOR_REDIRECT_URI=http://localhost:3000/auth/callback
# Vite reads these at build/dev time (build-time inline + dev-server pickup).
- VITE_BRIDGE_API_HOST=http://localhost:5000
- VITE_BRIDGE_ENV=local
- VITE_BRIDGE_CLIENT_ID=lux-bridge
- VITE_BRIDGE_IAM_ORG=lux-network
ports:
- "3000:3000"
- "3001:3001"
networks:
- bridge-network
depends_on:
- bridge-server
- lux-id
volumes:
- ./app/bridge:/app
- ./:/app
- /app/node_modules
- /app/.next
command: npm run dev
- /app/app/bridge/node_modules
command: sh -c "corepack enable && pnpm install --frozen-lockfile || pnpm install; pnpm -C app/bridge dev --host 0.0.0.0 --port 3001"
volumes:
lux-id-data:
+11 -11
View File
@@ -350,7 +350,9 @@ spec:
name: http
type: ClusterIP
---
# Bridge UI Deployment
# Bridge UI Deployment — Vite SPA served by ghcr.io/hanzoai/spa on :80.
# VITE_BRIDGE_* env documents the build-time inlined config; for true
# per-env values the image is built with those VITE_* vars baked in.
apiVersion: apps/v1
kind: Deployment
metadata:
@@ -370,19 +372,17 @@ spec:
- name: ui
image: ghcr.io/luxfi/bridge-ui:latest
ports:
- containerPort: 3000
- containerPort: 80
name: http
env:
- name: NEXT_PUBLIC_BRIDGE_API
- name: VITE_BRIDGE_API_HOST
value: https://bridge-api.lux.network
- name: NEXT_PUBLIC_BACKEND_API
value: https://bridge-api.lux.network
- name: NEXT_PUBLIC_IDENTITY_API
value: https://bridge-api.lux.network
- name: NEXT_PUBLIC_EXPLORER_API
value: https://bridge-api.lux.network
- name: NEXT_PUBLIC_NETWORK_NAME
- name: VITE_BRIDGE_ENV
value: mainnet
- name: VITE_BRIDGE_CLIENT_ID
value: lux-bridge
- name: VITE_BRIDGE_IAM_ORG
value: lux-network
resources:
requests:
memory: "256Mi"
@@ -401,7 +401,7 @@ spec:
app: bridge-ui
ports:
- port: 80
targetPort: 3000
targetPort: 80
name: http
type: ClusterIP
---
+1 -1
View File
@@ -47,7 +47,7 @@ echo -e "${GREEN}Bridge environment is starting up!${NC}"
echo -e "${YELLOW}Services:${NC}"
echo " - NATS: http://localhost:8223"
echo " - Consul: http://localhost:8501"
echo " - Bridge UI: http://localhost:3000"
echo " - Bridge UI: http://localhost:3001"
echo " - Bridge API: http://localhost:5000"
echo " - MPC Nodes: http://localhost:6000, :6001, :6002"
echo " - PostgreSQL: localhost:5433"