docs.hanzo.ai: serve compressed - static v0.5.1 -> v0.5.6

Nothing on the host was compressed. Measured against the live site with
Accept-Encoding: gzip, deflate, br, zstd, every response came back identity:
HTML, CSS, JS, .txt and .xml alike. The index is 1,527,061 bytes raw; /docs is
1,527,061; /sitemap.xml 454,222; /llms.txt 205,265; one RSC prefetch
(/docs/games/__next.docs.txt) 1,029,280.

The cause is the base image. hanzoai/static had no content-encoding path until
900bccf, which shipped as v0.5.6; this Dockerfile pinned v0.5.1.

Verified by building the v0.5.6 binary and serving this site's own index
through it, rather than trusting the tag:

  identity          1,527,061 bytes, no Content-Encoding
  Accept gzip         213,911 bytes, Content-Encoding: gzip, Vary: Accept-Encoding
  banner.png        passed through, no Content-Encoding
  gzip;q=0          1,527,061 bytes - the one spelling that means no

1.31 MB off every cold load of the front page.

Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
2026-08-05 16:50:08 -07:00
co-authored by Hanzo Dev
parent 1768b5e526
commit 8c5900be6e
+8 -1
View File
@@ -112,7 +112,14 @@ RUN pnpm install --frozen-lockfile \
# names the sections this app must not silently lose.
RUN sh scripts/check-export.sh "apps/${APP}/out"
FROM ghcr.io/hanzoai/static:v0.5.1
# v0.5.1 had no content-encoding path at all, so this site shipped every byte
# identity-encoded: 1,527,061 bytes of HTML on the index alone, a 454 KB
# sitemap and a 1 MB RSC prefetch, on every cold load, for a document that is
# ~14% entropy. hanzoai/static gained gzip in 900bccf and released it as
# v0.5.6. Measured by running the v0.5.6 binary over this site's own index:
# 1,527,061 -> 213,911 bytes with Vary: Accept-Encoding, the PNG untouched,
# and Accept-Encoding: gzip;q=0 correctly served identity.
FROM ghcr.io/hanzoai/static:v0.5.6
# Re-declared: an ARG is scoped to the stage that names it.
ARG APP=docs
COPY --from=build /src/apps/${APP}/out /public