mirror of
https://github.com/hanzoai/render.git
synced 2026-10-30 15:04:50 +00:00
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.
7 lines
415 B
Bash
Executable File
7 lines
415 B
Bash
Executable File
#!/bin/sh
|
|
# The Chrome @hanzo/frames launches (FRAMES_BROWSER_PATH): the binary CHROME_PATH
|
|
# names, with every request it makes leaving through the job's fence, and WebRTC
|
|
# kept off UDP so it cannot go around it.
|
|
[ -n "$RENDER_PROXY" ] || { echo "chrome: RENDER_PROXY is not set" >&2; exit 1; }
|
|
exec "${CHROME_PATH:?}" --proxy-server="$RENDER_PROXY" --force-webrtc-ip-handling-policy=disable_non_proxied_udp "$@"
|