Ranges marked `capture` keep their XOVER chunks in CORPUS_DIR (corpus/<group>/<start>-<end>/, edge-bench's layout, range.json once complete; only chunks that inflate). The prefetcher reads a stored chunk instead of fetching it, so a reset re-indexes them without the news server; a chunk a worker reports corrupt goes from the corpus too. edge-bench gets --releases (release chunks without payload, with their first subjects) and ships in the edge image; deploy/corpus_sweep.py marks more ranges (capture), replays the corpus with the deployed build (replay) and reports suspects and the change since the previous build (report). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
44 lines
1.6 KiB
Docker
44 lines
1.6 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 ./
|
|
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"]
|