fix: build separate Docker images per brand

Build distinct images with NEXT_PUBLIC_BRAND baked in at build time:
- web-latest (bootnode brand for bootno.de)
- web-hanzo-latest (hanzo brand for web3.hanzo.ai)

Next.js NEXT_PUBLIC_* vars are embedded at build, not runtime.
This commit is contained in:
2026-02-05 20:55:54 -08:00
parent 5c08394e43
commit fcda005d20
2 changed files with 28 additions and 5 deletions
+27 -4
View File
@@ -178,16 +178,39 @@ jobs:
cache-from: type=gha,scope=api
cache-to: type=gha,mode=max,scope=api
- name: Build and push Web image
- name: Build and push Bootnode Web image
uses: docker/build-push-action@v5
with:
context: ./web
push: true
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:web-latest
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:web-${{ steps.sha.outputs.short }}
cache-from: type=gha,scope=web
cache-to: type=gha,mode=max,scope=web
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:web-bootnode-${{ steps.sha.outputs.short }}
build-args: |
NEXT_PUBLIC_BRAND=bootnode
NEXT_PUBLIC_API_URL=https://api.bootno.de
NEXT_PUBLIC_WS_URL=wss://ws.bootno.de
NEXT_PUBLIC_IAM_URL=https://iam.hanzo.ai
NEXT_PUBLIC_IAM_CLIENT_ID=bootnode-platform
cache-from: type=gha,scope=web-bootnode
cache-to: type=gha,mode=max,scope=web-bootnode
- name: Build and push Hanzo Web3 image
uses: docker/build-push-action@v5
with:
context: ./web
push: true
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:web-hanzo-latest
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:web-hanzo-${{ steps.sha.outputs.short }}
build-args: |
NEXT_PUBLIC_BRAND=hanzo
NEXT_PUBLIC_API_URL=https://api.web3.hanzo.ai
NEXT_PUBLIC_WS_URL=wss://ws.web3.hanzo.ai
NEXT_PUBLIC_IAM_URL=https://iam.hanzo.ai
NEXT_PUBLIC_IAM_CLIENT_ID=hanzo-web3
cache-from: type=gha,scope=web-hanzo
cache-to: type=gha,mode=max,scope=web-hanzo
deploy:
runs-on: ubuntu-latest
+1 -1
View File
@@ -26,7 +26,7 @@ spec:
spec:
containers:
- name: web
image: ghcr.io/hanzoai/bootnode:web-latest
image: ghcr.io/hanzoai/bootnode:web-hanzo-latest
imagePullPolicy: Always
ports:
- name: http