Files
zeekay ee42369c45 Render worker for Hanzo Studio
A Node 24 process that claims render jobs from Studio's render lane
(/v1/studio/render), renders one output, asks the lane where it goes,
PUTs it there, and completes the job with the measured result.

Five ops: render.html (exact PNG/JPEG/WebP or one-page PDF),
render.document (PDF, DOCX, Markdown), render.slides (PPTX with notes,
or a 1920x1080 PDF per slide), render.composition (@hanzo/frames), and
video.edit (ffmpeg: trim, fit, join, libass captions, overlays, mixed
audio).

Every page runs in a fresh browser context behind request interception
and a per-job egress proxy, which frames' Chrome and Node go through
too; ffmpeg opens only local files through a demuxer whitelist.

The image is node:24-bookworm-slim with Debian's chromium-headless-shell
(amd64 and arm64), ffmpeg and fonts, built for both platforms by
hanzoai/ci.
2026-10-16 23:29:04 -07:00

26 lines
1.0 KiB
YAML

# Canonical CI/CD config for hanzoai/render, read by the hanzoai/ci reusable
# workflow and platform.hanzo.ai. One image for both architectures: the
# delegate lane (v2's default) builds each platform on a node of its own
# architecture and joins them under one index.
#
# The gate runs the node:test suites on the runner against the Chrome the
# runner image carries (Playwright's headless shell under /opt/playwright).
# The runner has no ffmpeg and cannot install one (no sudo), so the video.edit
# and render.composition suites report themselves skipped there and run
# wherever ffmpeg is on PATH. TAP output is what the gate's tally reads.
test:
- name: unit
run: |
set -euo pipefail
npm ci --ignore-scripts
CHROME_PATH="$(ls -d /opt/playwright/chromium_headless_shell-*/chrome-headless-shell-*/chrome-headless-shell | head -1)"
export CHROME_PATH
NODE_OPTIONS=--test-reporter=tap npm test
images:
- name: render
context: .
dockerfile: Dockerfile
repo: ghcr.io/hanzoai/render
platforms: [linux/amd64, linux/arm64]