mirror of
https://github.com/hanzoai/papers.git
synced 2026-10-22 17:20:17 +00:00
This repo had two workflows building one image. deploy-site.yml drove docker/setup-buildx-action, docker/login-action and docker/build-push-action on a runner, and that is not a road this fleet has: the ephemeral pool carries no daemon and the job died on /var/run/docker.sock: no such file or directory. It is deleted rather than pinned to the one host that still has docker, because the answer to "no daemon here" is not "find the machine with a daemon". cicd.yml drops `mode: buildx` and takes the door's default. The door builds one BuildKit Job per architecture, each on a node of that architecture — in-cluster, no docker anywhere, nothing emulated. buildx was pinned because the door refuses a context below the repository root and this image's was `site`. So the context is the root now, and .dockerignore does the work the narrow context was doing: 827M of repository, and what reaches the image is the site's own tree. site/node_modules alone is 414M of what it drops. The Dockerfile's paths move with it. platforms goes back to both. The declaration and the mode finally agree — two platforms and a builder that can produce two, where before the tree asked for two from a builder that could only ever make one and was refused for it, which is the state the build sat in from 2026-09-03. Co-authored-by: Hanzo Dev <[email protected]>
24 lines
1.1 KiB
Docker
24 lines
1.1 KiB
Docker
# papers.hanzo.ai — Next.js static export served by hanzoai/static.
|
|
#
|
|
# Paths are from the REPOSITORY ROOT, not from site/. The build door's context
|
|
# is the whole repo at one commit and it refuses anything narrower, so a root
|
|
# context is the price of building each architecture natively in-cluster
|
|
# instead of emulating one of them on a runner. .dockerignore keeps it cheap.
|
|
#
|
|
# Built on Hanzo's own hardware (platform.hanzo.ai → arcd / in-cluster kaniko),
|
|
# never on GitHub builders. Multi-stage: produce the static export, then bake it
|
|
# into the scratch-based hanzoai/static image at /public. The image IS the site.
|
|
FROM node:20-alpine AS build
|
|
WORKDIR /app
|
|
COPY site/package.json site/package-lock.json ./
|
|
RUN npm ci
|
|
COPY site/ .
|
|
ENV NEXT_PUBLIC_BRAND=hanzo
|
|
RUN npm run build # next.config.mjs: output:'export' → writes ./out
|
|
|
|
# hanzoai/static: FROM scratch, ENTRYPOINT ["/static"], serves -root (default
|
|
# /public) on -port (set by the operator Service CR args). Pinned to the tag the
|
|
# cluster already runs (see universe crs/cdn.yaml).
|
|
FROM ghcr.io/hanzoai/static:0.5.15
|
|
COPY --from=build /app/out /public
|