Files
zeekayandHanzo Dev a80bbcf3b4 aml: the API and the console are two deploy units
The daemon was serving its own dashboard from /_/aml/ inside the same pod
and the same image. That is one host doing two jobs: the API belongs at
api.<brand>/v1/aml, one door for data, and a console belongs on its own
host as a compiled bundle. Sharing a pod shares a blast radius and a
rollout, and the embedded copy was unreachable from outside in any case.

ghcr.io/luxfi/aml is now the daemon alone — no UI stage, no embedui tag, no
embed seam. ghcr.io/luxfi/aml-ui is ghcr.io/hanzoai/static with the bundle
in /public and -spa, so a hard refresh on /cases resolves. Both are built
by the release workflow under one tag, so a version names one state of the
product; the console's smoke proves it serves, that SPA_* reaches
config.json, and that a deep link falls back to index.html. CI typechecks
and builds the bundle on every branch, so a type error fails before a
release rather than during one.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-30 17:58:01 -07:00

36 lines
1.0 KiB
Makefile

.PHONY: build ui notice test vet run clean
VERSION := $(shell git describe --tags --always 2>/dev/null || echo dev)
LDFLAGS := -ldflags="-s -w -X main.version=$(VERSION)"
NOTICE := THIRD-PARTY-NOTICES
# The daemon is the API. The console is a separate artifact with its own image
# (ui/Dockerfile), so nothing here waits on a bundle.
build: notice
CGO_ENABLED=0 go build -trimpath $(LDFLAGS) -o amld ./cmd/amld/
# The console, for a local look. The image build runs the same two commands.
ui:
npm --prefix ui ci
npm --prefix ui run build
# Third-party license and notice texts for the binary, derived from its module
# graph. Generated with the same tags and CGO setting the product ships with, so
# it describes the artifact that is distributed and not some other graph. No
# -platforms: this target builds one binary, for this host.
notice:
CGO_ENABLED=0 go run ./internal/notice -pkg ./cmd/amld -name amld -o $(NOTICE)
test:
go test -race -count=1 ./...
vet:
go vet ./...
run: build
./amld serve --dev
clean:
rm -f amld $(NOTICE)
rm -rf data/ ui/dist/