From f0f7723a61cd38a8bf1fbe7032f2ffd32ba7f8ee Mon Sep 17 00:00:00 2001 From: Ahmed Saleh Date: Tue, 21 Apr 2026 16:39:03 +0200 Subject: [PATCH] Containerize docs for self-hosting on eks-general MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Builds the Eleventy static site into a Docker image and publishes it to ECR, matching the pattern already in use by pusher/engineering- manual. The image is a thin nginx-unprivileged:1.27-alpine wrapper around the built _site/ directory; k8s manifests will follow in a platform-gitops PR. Changes in this repo: - Dockerfile + docker/nginx.conf: serves /docs/ on :8080, runs as non-root. Ports the 35 permanent redirects from vercel.json into nginx config. Preserves trailingSlash: true behavior via an explicit rewrite. Adds /healthz for k8s probes. Short TTL on HTML, 30 day immutable cache on /docs/static/* and on fingerprinted assets. - .github/workflows/release.yml: AWS OIDC/ECR login, yarn build, optional Algolia index push on main, docker build, push to 008815156580.dkr.ecr.us-east-1.amazonaws.com/pusher/docs. Copied from pusher/engineering-manual; PR builds push too (unique tag per commit, matches repo convention). - package.json: split `build` into `build:css` + `build:site`. Add `update:algolia` task (kept the old `updateAlgoliaIndex` alias so nothing that calls the old name breaks). - postcss.config.js, _data/env.js, search/update-algolia-index.js: read BUILD_ENV instead of VERCEL_ENV, falling back to VERCEL_ENV for a transition window. update-algolia-index.js now fails loudly if BUILD_ENV=production but ALGOLIA_UPDATE_KEY is missing. - Drop api/search.js + the api/ directory: the Vercel serverless function that rendered HTML search results for users without JS. Client-side Algolia remains the primary experience; a