Files
aml/Dockerfile
T
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.4 KiB
Docker

# The API daemon. The console is a separate image built from ui/Dockerfile and
# served on its own host — see ui/Dockerfile and LLM.md.
#
# Every dependency resolves through the default module proxy and is checked
# against the default checksum database, so a tag that moves after the fact
# cannot change what this image contains: proxy.golang.org serves the zip it
# first recorded, and sum.golang.org is an append-only witness of that zip's
# hash. go.sum carries the witnessed hashes — see LLM.md, "Dependency pinning".
# Nothing here is fetched from the git host, so the build needs no credential.
FROM golang:1.26.4-alpine AS build
RUN apk add --no-cache git
ARG VERSION=dev
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 go build -trimpath \
-ldflags="-s -w -X main.version=${VERSION}" -o /app/amld ./cmd/amld/
# Third-party license and notice texts for the binary just built, derived from
# its module graph while the module cache is still present.
RUN CGO_ENABLED=0 go run ./internal/notice -pkg ./cmd/amld -name amld \
-o /app/THIRD-PARTY-NOTICES
# Runtime
FROM alpine:3.21
RUN apk add --no-cache ca-certificates tzdata
COPY --from=build /app/amld /app/amld
COPY --from=build /app/THIRD-PARTY-NOTICES /app/THIRD-PARTY-NOTICES
COPY LICENSE /app/LICENSE
WORKDIR /data
EXPOSE 8090
ENTRYPOINT ["/app/amld"]
CMD ["serve", "--http=0.0.0.0:8090"]