mirror of
https://github.com/hanzo-apps/gallery.git
synced 2026-10-30 14:48:38 +00:00
ghcr.io/hanzoai/static served only linux/amd64 from v0.5.1 through 0.5.14, so an image built on it has no manifest an arm64 node can pull. 0.5.15 is the same server source published as an index over both architectures. Co-authored-by: Hanzo Dev <[email protected]>
26 lines
1.2 KiB
Docker
26 lines
1.2 KiB
Docker
# gallery.hanzo.ai — the Hanzo template gallery (72 real templates).
|
|
# Next.js static export (output: 'export') served by hanzoai/static — NOT nginx.
|
|
# Two stages: build the export, then re-serve it through the canonical static server.
|
|
|
|
# 1) Build the Next.js static export -> /app/out
|
|
# node:24 (LTS) has stable TypeScript type-stripping so the `prebuild` step can
|
|
# `import` app/templates-data.ts directly to emit public/templates.json (the SoT
|
|
# -> canonical catalog API). No flags needed.
|
|
FROM node:24-bookworm-slim AS build
|
|
WORKDIR /app
|
|
COPY package.json package-lock.json ./
|
|
RUN npm ci --no-audit --no-fund
|
|
COPY . .
|
|
# next.config.ts sets output:'export'; produces /app/out. Turbopack build can be
|
|
# flaky in CI containers, so build with the stable webpack builder.
|
|
ENV NEXT_TELEMETRY_DISABLED=1
|
|
RUN npm run build
|
|
|
|
# 2) Serve the static export with hanzoai/static. --spa rewrites unknown routes
|
|
# to index.html (client routing); :3000 is the static default, and the
|
|
# gallery-site Service maps servicePort 80 -> targetPort 3000.
|
|
FROM ghcr.io/hanzoai/static:0.5.15
|
|
COPY --from=build /app/out /srv
|
|
EXPOSE 3000
|
|
ENTRYPOINT ["/static", "--root=/srv", "--spa", "--port=3000"]
|