mirror of
https://github.com/hanzoai/bootnode.git
synced 2026-10-25 02:31:30 +00:00
Names the two halves for what they are. The repo already holds both (12407e9 merged bootnode/bootnode into this history); this makes the frontend directory say so, so the layout reads the way the owner describes the system: backend and frontend separate, one repo. git mv throughout — 187 renames, history preserved. Every path reference follows: hanzo.yml build context and dockerfile, compose.yml, compose.prod.yml, start.sh, LLM.md, infra/k8s/web-deployments.yaml, infra/cloud/deploy.sh, and the Dockerfile's own COPY paths. Image and container names (bootnode-web, the -web tag suffix) are deliberately NOT renamed here: those are a deploy contract the App CR and ingress bind to on port 3001, and breaking them is a separate, staged change. Console builds green after the move; the Go tree builds. Co-authored-by: Hanzo Dev <[email protected]>
108 lines
3.4 KiB
YAML
108 lines
3.4 KiB
YAML
# Bootnode web console — ONE deployment, every brand.
|
|
#
|
|
# This file used to declare four near-identical Deployments and four Services
|
|
# (bootnode-web-{hanzo,lux,zoo,pars}) running the SAME image, differing only in
|
|
# NEXT_PUBLIC_BRAND / _API_URL / _WS_URL / _IAM_URL / _IAM_CLIENT_ID /
|
|
# _IAM_DOMAIN. Two things were wrong with that:
|
|
#
|
|
# 1. It contradicted its own header comment ("one universal image, brand
|
|
# selected at runtime") — the brand was selected at DEPLOY time, four
|
|
# times, and had to be kept in sync with IAM by hand.
|
|
# 2. None of those variables did anything. The image is a Next.js static
|
|
# export served by the Go hanzoai/static binary; NEXT_PUBLIC_* is inlined
|
|
# into the client bundle when the image is BUILT, and no process in the
|
|
# container ever reads its environment. Four copies of a setting that was
|
|
# never applied.
|
|
#
|
|
# console/lib/brand.ts now resolves brand, theme, API origin, IAM issuer and OIDC
|
|
# client from window.location.hostname. One Deployment serves bootno.de,
|
|
# web3.hanzo.ai, lux.cloud, zoo.cloud and cloud.zoo.network, and adding the
|
|
# sixth host is an ingress rule plus a callback registration — no new workload.
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: bootnode-web
|
|
namespace: bootnode
|
|
labels:
|
|
app: bootnode-web
|
|
component: frontend
|
|
spec:
|
|
# Was 4 deployments x 2 replicas = 8 pods serving one identical bundle.
|
|
replicas: 3
|
|
selector:
|
|
matchLabels:
|
|
app: bootnode-web
|
|
strategy:
|
|
type: RollingUpdate
|
|
rollingUpdate:
|
|
maxSurge: 1
|
|
maxUnavailable: 0
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: bootnode-web
|
|
component: frontend
|
|
spec:
|
|
containers:
|
|
- name: web
|
|
image: ghcr.io/hanzoai/bootnode:latest-web
|
|
imagePullPolicy: Always
|
|
ports:
|
|
- name: http
|
|
containerPort: 3001
|
|
protocol: TCP
|
|
# No env. Every value that was here is now hostname-derived in the
|
|
# browser, which is the only layer that knows which brand is being
|
|
# served on this request.
|
|
resources:
|
|
requests:
|
|
cpu: "100m"
|
|
memory: "128Mi"
|
|
limits:
|
|
cpu: "1000m"
|
|
memory: "512Mi"
|
|
# Probe `/`, not `/api/health`. The runtime is a static file server:
|
|
# `/` is the one path guaranteed to exist and it proves the bundle is
|
|
# actually being served. `/api/health` also broke the standing rule
|
|
# that public paths are /v1/*, never /api/*.
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: http
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 15
|
|
timeoutSeconds: 5
|
|
failureThreshold: 5
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: http
|
|
initialDelaySeconds: 3
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
failureThreshold: 5
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
runAsUser: 1001
|
|
allowPrivilegeEscalation: false
|
|
readOnlyRootFilesystem: true
|
|
capabilities:
|
|
drop: ["ALL"]
|
|
imagePullSecrets:
|
|
- name: ghcr-secret
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: bootnode-web
|
|
namespace: bootnode
|
|
spec:
|
|
type: ClusterIP
|
|
ports:
|
|
- name: http
|
|
port: 3001
|
|
targetPort: http
|
|
selector:
|
|
app: bootnode-web
|