|
1 | | -# Bitcode pipeline appliance image for Vercel Sandbox (VCR). |
2 | | -# Create sandboxes with: Sandbox.create({ image: 'bitcode-pipeline:<tag>', … }) |
3 | | -# not stock runtime + monorepo install. |
| 1 | +# Pipeliner — Bitcode pipeline appliance for Vercel Sandbox (VCR). |
| 2 | +# Repository: vcr.vercel.com/gerald-davis-projects/bitcode/pipeliner |
4 | 3 | # |
5 | | -# Build from monorepo root: |
6 | | -# docker build -f packages/pipeline-image/Dockerfile -t bitcode-pipeline:local . |
| 4 | +# Purpose: deposit/read AssetPack synthesis inside Sandbox microVMs with |
| 5 | +# Bitcode packages + runners preinstalled (not stock node24 + monorepo install). |
| 6 | +# |
| 7 | +# Build from monorepo root (materialize first): |
| 8 | +# pnpm --filter @bitcode/pipeline-image run materialize |
| 9 | +# docker build -f packages/pipeline-image/Dockerfile \ |
| 10 | +# -t vcr.vercel.com/gerald-davis-projects/bitcode/pipeliner:latest . |
7 | 11 |
|
8 | 12 | FROM node:24-bookworm-slim AS base |
9 | 13 | RUN corepack enable && corepack prepare pnpm@10.33.0 --activate |
10 | 14 | WORKDIR /opt/bitcode |
11 | 15 |
|
12 | 16 | # Minimal system deps for git clone of customer sources inside the sandbox. |
13 | | -RUN apt-get update \\ |
14 | | - && apt-get install -y --no-install-recommends git ca-certificates \\ |
| 17 | +RUN apt-get update \ |
| 18 | + && apt-get install -y --no-install-recommends git ca-certificates \ |
15 | 19 | && rm -rf /var/lib/apt/lists/* |
16 | 20 |
|
17 | | -# Copy workspace manifests first for better layer caching. |
| 21 | +# Workspace manifests + packages |
18 | 22 | COPY package.json pnpm-workspace.yaml pnpm-lock.yaml .npmrc* ./ |
19 | | -COPY packages/pipeline-hosts/package.json packages/pipeline-hosts/ |
20 | | -COPY packages/pipeline-image/package.json packages/pipeline-image/ |
21 | | -COPY packages/host-generics/package.json packages/host-generics/ |
22 | | -COPY packages/generic-hosts/Local/package.json packages/generic-hosts/Local/ |
23 | | -COPY packages/generic-hosts/VercelSandbox/package.json packages/generic-hosts/VercelSandbox/ |
24 | | - |
25 | | -# Remaining packages (filter install still needs workspace graph). |
26 | 23 | COPY packages ./packages |
27 | 24 |
|
28 | | -# Install workspace deps used by host + pipeline runners. |
29 | | -RUN pnpm install --frozen-lockfile \\ |
30 | | - --filter @bitcode/pipeline-hosts... \\ |
31 | | - --filter @bitcode/pipeline-image... \\ |
32 | | - --filter @bitcode/asset-packs-pipelines-domain... \\ |
33 | | - --filter @bitcode/pipelines-generics... \\ |
34 | | - --filter @bitcode/btd... \\ |
35 | | - --filter @bitcode/supabase... \\ |
| 25 | +# Install workspace (filter when possible; full install fallback). |
| 26 | +RUN pnpm install --frozen-lockfile \ |
| 27 | + --filter @bitcode/pipeline-hosts... \ |
| 28 | + --filter @bitcode/pipeline-image... \ |
| 29 | + --filter @bitcode/asset-packs-pipelines-domain... \ |
| 30 | + --filter @bitcode/pipelines-generics... \ |
| 31 | + --filter @bitcode/btd... \ |
| 32 | + --filter @bitcode/supabase... \ |
36 | 33 | || pnpm install --frozen-lockfile |
37 | 34 |
|
38 | | -# Materialize runners + dispatcher into dist, then install image layout paths. |
39 | | -RUN pnpm --filter @bitcode/pipeline-image run materialize \\ |
40 | | - && mkdir -p /opt/bitcode/.bitcode/pipeline-host /opt/bitcode/pipeline \\ |
41 | | - && cp packages/pipeline-image/dist/run-host-smoke.mjs /opt/bitcode/.bitcode/pipeline-host/ \\ |
42 | | - && cp packages/pipeline-image/dist/run-live-asset-pack-pipeline.mjs /opt/bitcode/.bitcode/pipeline-host/ \\ |
| 35 | +# Pre-materialized runners (built on host/CI before docker build). |
| 36 | +# Layout preserves live-runner relative imports: ../../packages → monorepo packages. |
| 37 | +RUN mkdir -p /opt/bitcode/.bitcode/pipeline-host /opt/bitcode/pipeline \ |
| 38 | + && cp packages/pipeline-image/dist/run-host-smoke.mjs /opt/bitcode/.bitcode/pipeline-host/ \ |
| 39 | + && cp packages/pipeline-image/dist/run-live-asset-pack-pipeline.mjs /opt/bitcode/.bitcode/pipeline-host/ \ |
43 | 40 | && cp packages/pipeline-image/dist/run-pipeline.mjs /opt/bitcode/pipeline/run-pipeline.mjs |
44 | 41 |
|
45 | 42 | ENV BITCODE_MONOREPO_ROOT=/opt/bitcode |
46 | 43 | ENV BITCODE_PIPELINE_IMAGE_ENTRY=/opt/bitcode/pipeline/run-pipeline.mjs |
47 | 44 | WORKDIR /vercel/sandbox |
48 | 45 |
|
49 | | -# Default command documents the entry; host plans pass runCommand explicitly. |
50 | 46 | CMD ["node", "/opt/bitcode/pipeline/run-pipeline.mjs"] |
0 commit comments