- Rasterizer: playwright-core + system Chromium renders dom steps to PNG (1280x800, JavaScript disabled — snapshots stay inert). Cached permanently on the step (dom_html immutable). CHROMIUM_PATH configurable. - Video render now includes DOM steps as real frames (verified h264 1280x800, 0 skipped); guides now show rasterized screenshots for DOM steps - Branching: per-step branch hotspots (dashed, labeled) jumping to any target step; lead gates respected on branch jumps - Chapters: demo-level chapter menu in player bar - API: PATCH /api/demos/:id (name, chapters), branches on step patch, both in public JSON - MCP surface: 15 tools (+set_step_branches, +set_chapters) - Docker: chromium + fonts in runtime image, CHROMIUM_PATH preset
24 lines
878 B
Docker
24 lines
878 B
Docker
# Version: 0.1.0
|
|
FROM node:22-alpine AS build
|
|
WORKDIR /app
|
|
COPY package.json ./
|
|
COPY apps/api/package.json apps/api/
|
|
COPY apps/editor/package.json apps/editor/
|
|
RUN npm install --workspaces --include-workspace-root
|
|
COPY tsconfig.base.json ./
|
|
COPY apps ./apps
|
|
RUN npm run build -w apps/editor && npm run build -w apps/api
|
|
|
|
FROM node:22-alpine
|
|
RUN apk add --no-cache ffmpeg chromium nss freetype harfbuzz ca-certificates ttf-freefont
|
|
ENV CHROMIUM_PATH=/usr/bin/chromium-browser
|
|
WORKDIR /app
|
|
ENV NODE_ENV=production
|
|
COPY package.json ./
|
|
COPY apps/api/package.json apps/api/
|
|
RUN npm install --omit=dev -w apps/api --include-workspace-root=false && npm cache clean --force
|
|
COPY --from=build /app/apps/api/dist apps/api/dist
|
|
COPY --from=build /app/apps/api/public apps/api/public
|
|
COPY apps/api/src/migrations apps/api/dist/migrations
|
|
EXPOSE 3000
|
|
CMD ["node", "apps/api/dist/index.js"]
|