Repository navigation
[PR] feat: add Dockerfile + docs for container deployments (#3389) - #3392
Conversation
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.3996-pr.3392.773f63dThis exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr3392.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 查重:不重复。 检索 open+closed issues/PR(docker/container 关键词):无既有「官方 Dockerfile / 容器化部署」条目。相关但不同:#3341(用户手搓 Docker 部署遇 Node 20 崩溃——需求真实性证据 + 基础镜像下限依据);#697(CI 内 docker 仅跑 codex e2e,与产品部署无关)。本 PR 即 #3389 的交付物。 开始按 PR Review 规范审:①原 issue 方向 → ②回归审查 → ③代码 → ④测试有效性 → ⑤/⑤b diff 与代码整洁,结论按八问给出。PR head |
- Dockerfile at repo root: node:24-slim base (builtin node:sqlite, no native-addon download; Node 20 bases crash the SQLite path, #3341), installs the published npm package at build time (ARG BILI_VERSION), listens on 0.0.0.0:8787, declares the four XDG dirs as VOLUMEs, node-fetch HEALTHCHECK on /__bili/health. - ACP_AUTO_UPDATE=0 by default: the sanctioned update channel for a containerized copy is image rebuild/pull; in-place self-update would silently revert to the image version on recreate. Opt back in with -e ACP_AUTO_UPDATE=1. - .dockerignore keeps the build context minimal (the image COPYs nothing). - README en/zh: new Running-in-Docker section + Install pointer.
e3e38d4 to
456d6f8
Compare
(ai: vllm-qwen/qwen3.8-27b) PR #3392 审核结论(独立重审,非复读 issue 侧分析)做了什么:逐行重读全部 diff(+89/-0,仅 4 个文件:Dockerfile、.dockerignore、README.md、README.zh-CN.md,零代码改动);把 PR 里每一条事实性声明对照源码逐一验证;rebase 到当前 master( 逐项验证结果(全部属实):
CI(head 结构化八问
两条非阻塞观察(记录在案,不拦):① 镜像无 判定:可合。 rebase 后 CI 全绿,diff 干净(每一行都服务于本 PR 目的),zh/en 同步,声明全部经源码验证。合并动作留给人工:#3392 |
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.664-master.2b7829f # this exact build
npm install -g billion-context@master # always the newest merged build
|
Closes #3389
Adds first-class Docker support: a
Dockerfileat the repository root plus docs, sodocker build && docker runyields a working proxy.What changed
Dockerfile(repo root) —node:24-slimbase; installs the published npm package at build time (ARG BILI_VERSION=latest, pin with--build-arg BILI_VERSION=0.1.197);CMD ["bili","--host","0.0.0.0","--port","8787"];EXPOSE 8787; declares the four XDG dirs fromsrc/paths.tsasVOLUMEs;HEALTHCHECKprobes/__bili/healthwith node's builtin fetch (no curl in slim)..dockerignore— the image COPYs nothing from the context (npm install at build time), so this shrinks the build context to just the Dockerfile itself.Design decisions (all reuse existing mechanisms — zero new config surface)
node:sqlite(Node ≥ 22.5), so the container never downloads a native addon. Node 20 bases are documented as unsupported: the self-downloaded better-sqlite3@13 requires Node ≥ 22 and crashes under 20 (Node 20 Docker startup segfaults after SQLite self-bootstrap #3341 — where a real user hit exactly this while hand-rolling a Docker deployment).ENV ACP_AUTO_UPDATE=0— behavior default of the new artifact. Per the Install-Lane & Update-Ownership Contract, the sanctioned update channel for a containerized copy is rebuilding/pulling a newer image. An in-place self-update mutates the container filesystem and is silently reverted to the image version on the next recreate = silent version drift. Users who want the old behavior opt back in with-e ACP_AUTO_UPDATE=1. Advisory checks stay on (independent fail-open mechanism, the product's designed "autoUpdate off" posture).--host 0.0.0.0no-auth caveat is carried into the docs: expose 8787 only on trusted networks.Verification (targeted, local — no docker available in this environment)
Verified the image's runtime contract natively against the published artifact v0.1.197: fresh isolated XDG env +
ACP_AUTO_UPDATE=0+ exact CMD → healthy within 1s (GET /__bili/health→{"ok":true,...}), storage engine resolved tonode:sqlite/builtin(no addon download), all state written under the four declared dirs, clean SIGTERM flush; the exact HEALTHCHECK expression executed → exit 0. Full-suite verdict comes from CI on this head.Out of scope (follow-up candidate)
CI-built/pushed registry images (ghcr.io vs elsewhere needs an owner decision) — separate issue when wanted.