replay:corpus runs edge-bench --group over a group's complete corpus ranges in article order (one window, carried from range to range, finished after the last range; edge/src/lease.rs holds the lease JSON the worker and the bench share) and stores every batch through BatchStore as the worker would, then reports releases finished, provisional, complete and the bytes per header of the NVMe and HDD tables. Refuses a database not named *_replay or *_scratch. The app image carries edge-bench; compose gets a replay profile for homelab. Design amended (REBUILD.md 1, 2, 5): the window is carried by one worker a group, no block leases and no block merger; provisional writes stay for the lease ends. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
46 lines
1.7 KiB
Docker
46 lines
1.7 KiB
Docker
# syntax=docker/dockerfile:1
|
|
#
|
|
# Voyager 2's images (deploy/compose.yaml):
|
|
# --target app the AdonisJS app: web server, coordinator, migrations, ace commands
|
|
# --target edge the Rust edge worker (edge/, bin edge-node)
|
|
|
|
# Node is pinned as in CI (.nvmrc): on 24.21, jsonschema 1.5.0 (used by Ace to
|
|
# validate commands) throws "Invalid URL" on $ref, so no ace command starts.
|
|
ARG NODE_VERSION=24.16
|
|
|
|
# The app, compiled, with production dependencies only.
|
|
FROM node:${NODE_VERSION}-bookworm AS app-build
|
|
WORKDIR /src
|
|
COPY package.json package-lock.json ./
|
|
RUN npm ci
|
|
COPY . .
|
|
RUN node ace build \
|
|
&& cd build \
|
|
&& npm ci --omit=dev
|
|
|
|
FROM node:${NODE_VERSION}-bookworm-slim AS app
|
|
ENV NODE_ENV=production
|
|
WORKDIR /app
|
|
COPY --from=app-build /src/build ./
|
|
# The Rust indexer's bench: `node ace replay:corpus` runs a group's corpus through it (the replay harness).
|
|
COPY --from=edge-build /usr/local/bin/edge-bench /usr/local/bin/edge-bench
|
|
USER node
|
|
# Every service picks its own command, e.g. `node ace coordinator:run`.
|
|
CMD ["node", "ace", "list"]
|
|
|
|
# The Rust worker. Registry and target dir are build caches, so a rebuild only compiles what changed.
|
|
FROM rust:1-bookworm AS edge-build
|
|
WORKDIR /src
|
|
COPY edge ./
|
|
RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
|
--mount=type=cache,target=/src/target \
|
|
cargo build --release --locked --bin edge-node --bin edge-bench \
|
|
&& cp target/release/edge-node target/release/edge-bench /usr/local/bin/
|
|
|
|
FROM debian:bookworm-slim AS edge
|
|
COPY --from=edge-build /usr/local/bin/edge-node /usr/local/bin/edge-node
|
|
# edge-bench replays the corpus for the grouping sweeps (deploy/corpus_sweep.py).
|
|
COPY --from=edge-build /usr/local/bin/edge-bench /usr/local/bin/edge-bench
|
|
USER 1000:1000
|
|
ENTRYPOINT ["/usr/local/bin/edge-node"]
|