Files
docs/apps/flow/Dockerfile.static
zeekay 15b2e99ca8 flow-site: serve via hanzoai/static, not nginx
Replace the nginx:alpine Dockerfile.static (platform rule violation) with a
hanzoai/static re-serve shim that wraps the existing flow-site:0.1.0 Next.js
export. Pin apps/flow/Dockerfile (from-source build) to static:0.4.1 and add
the explicit --root=/srv --spa --port=3000 entrypoint. flow.hanzo.ai was
serving ~20 bytes from the broken nginx pod; this serves the real 64 KB export.
2026-06-25 14:23:46 -07:00

29 lines
1.4 KiB
Docker

# flow-site — serve the published Next.js export via hanzoai/static, NOT nginx.
#
# The nginx-based flow-site:0.1.0 image violated the platform rule
# "no nginx — use hanzoai/ingress + hanzoai/static only", and at runtime it
# served an empty/broken response (flow.hanzo.ai returned ~20 bytes). This
# Dockerfile RE-SERVES the already-built, in-image static export
# (/usr/share/nginx/html — a full ~64 KB Next.js export) through the canonical
# hanzoai/static server: byte-identical content, nginx removed.
#
# Same edge-serve-layer migration as commerce/Dockerfile.site. When the
# from-source apps/flow build (apps/flow/Dockerfile) is wired into arcd it
# becomes the content source and this re-serve shim retires.
#
# Build (BuildKit, on-cluster — no GHA):
# --opt=context=https://github.com/hanzoai/docs.git#main
# --opt=filename=apps/flow/Dockerfile.static
# --output=type=image,name=ghcr.io/hanzoai/flow-site:<tag>,push=true
# 1) The existing, in-production built Next.js export.
FROM ghcr.io/hanzoai/flow-site:0.1.0 AS content
# 2) Serve it with hanzoai/static. --spa rewrites unknown routes to index.html
# (Next.js export client routing); :3000 is the static default; the flow-site
# Service maps servicePort 80 -> targetPort 3000.
FROM ghcr.io/hanzoai/static:0.4.1
COPY --from=content /usr/share/nginx/html /srv
EXPOSE 3000
ENTRYPOINT ["/static", "--root=/srv", "--spa", "--port=3000"]