docs: keep Docker setup docs scoped

This commit is contained in:
Pi Web Agent
2026-07-02 20:47:39 +00:00
parent 01c75298f9
commit 14d0b0f181
7 changed files with 32 additions and 64 deletions
-5
View File
@@ -1,5 +0,0 @@
---
"@jmfederico/pi-web": patch
---
Add a beta Docker runtime and development setup with a single `pi-web-docker` command surface, a production one-line install that does not require host Node.js, local image builds, split session/web services, profile-specific host access for native Linux and Docker Desktop for Mac, shared persistent data, custom image hooks, and Docker usage documentation.
-5
View File
@@ -1,5 +0,0 @@
---
"@jmfederico/pi-web": patch
---
Expose Docker-aware PI WEB status, update, and restart commands in the Updates panel through the canonical `pi-web-docker` command, keep the Updates tab visible across federated Docker runtimes, including Docker development runtimes with explicit `pi-web-docker --dev ...` commands, and harden production and development Docker workflows around generated Compose assets, Compose project-name isolation, clearer checkout/runtime guidance, root-safety checks, UID/GID preservation, and detached helper execution.
-8
View File
@@ -80,14 +80,6 @@ pi install npm:@jmfederico/pi-web
In Pi, use `/pi-web install`, `/pi-web status`, `/pi-web logs`, `/pi-web restart`, `/pi-web doctor`, and `/pi-web version`.
Docker beta runtime/server install is available when you want a local image and do not want Node.js or npm on the host:
```bash
curl -fsSL https://raw.githubusercontent.com/jmfederico/pi-web/main/docker/install.sh | sh
```
See the [Docker guide](https://github.com/jmfederico/pi-web/blob/main/docker/README.md) for trust model, supported host profiles, commands, and development mode.
## Core model
PI WEB organizes work like this:
-22
View File
@@ -92,7 +92,6 @@
<a href="#requirements">Requirements</a>
<a href="#user-services">User service install</a>
<a href="#one-line">One-line install</a>
<a href="#docker-beta">Docker beta install</a>
<a href="#pi-package">Install through Pi</a>
<a href="#manual-run">WSL / manual run</a>
<a href="#remote-access">Remote access</a>
@@ -150,27 +149,6 @@
</div>
</section>
<section id="docker-beta">
<h2>Docker beta install</h2>
<p>
The beta Docker runtime builds a local image and runs split <code>sessiond</code> + <code>web</code> services. It does not require
Node.js or npm on the host; it requires a supported Docker/Compose setup and trusted host paths.
</p>
<div class="code-card">
<div class="copy-row">
<strong>Docker one-liner</strong>
<button class="copy-button" data-copy="#docker-one-line-install">Copy</button>
</div>
<pre id="docker-one-line-install"><code><span class="prompt">$</span> curl -fsSL https://raw.githubusercontent.com/jmfederico/pi-web/main/docker/install.sh | sh</code></pre>
</div>
<p>
After installation, manage it with <code>~/.local/share/pi-web-docker/pi-web-docker status</code>, <code>update</code>,
<code>restart</code>, <code>logs</code>, and related commands. Development mode uses
<code>./docker/pi-web-docker --dev &lt;command&gt;</code> from a checkout.
</p>
<p><a href="https://github.com/jmfederico/pi-web/blob/main/docker/README.md">Read the Docker guide</a> for the trust model, supported host profiles, command matrix, root-safety notes, and development mode.</p>
</section>
<section id="pi-package">
<h2>Install through Pi</h2>
<p>PI WEB is also published as a Pi package. This exposes a <code>/pi-web</code> command inside Pi.</p>
+6 -8
View File
@@ -212,9 +212,7 @@ After editing, check the manifest endpoint and browser-console failure cases.</c
<p>
<strong>Updates</strong> adds a conditional <strong>Updates</strong> workspace tab with PI WEB update,
restart, and installed-service guidance. It is built into PI WEB, enabled by default, and uses the
selected machine's plugin copy when machine federation is active. Docker runtimes also publish a small
manifest hint so federated gateways can keep the remote Updates tab visible and expose Docker commands
while gateway status parsing catches up.
selected machine's plugin copy when machine federation is active.
</p>
<ul>
<li>Plugin id: <code>updates</code></li>
@@ -260,11 +258,11 @@ After editing, check the manifest endpoint and browser-console failure cases.</c
"version": 1,
"tasks": [
{
"id": "docker.start",
"title": "Start Docker",
"group": "Docker",
"description": "Start the local Docker Compose environment.",
"command": "./docker/pi-web-docker --dev start"
"id": "app.start",
"title": "Start app",
"group": "Development",
"description": "Start the local development server.",
"command": "npm run dev"
},
{
"id": "db.reset",
+8 -8
View File
@@ -190,7 +190,7 @@ Built-in plugins can be managed from **Settings → Plugins** or with the top-le
**Plugin id:** `updates`
**What it does:** adds a conditional **Updates** workspace tab with PI WEB update, restart, and installed-service guidance.
Updates is enabled by default. It declares `machineSpecific: true` so the gateway Updates tab only appears for the local machine; while a remote machine is selected, that remote machine's Updates plugin is used if available. Docker runtimes add a small manifest hint so federated gateways can keep the remote Updates tab visible and expose Docker commands while gateway status parsing catches up. To hide it, disable `updates` in **Settings → Plugins** or set:
Updates is enabled by default. It declares `machineSpecific: true` so the gateway Updates tab only appears for the local machine; while a remote machine is selected, that remote machine's Updates plugin is used if available. To hide it, disable `updates` in **Settings → Plugins** or set:
```json
{
@@ -223,11 +223,11 @@ Configure workspace tasks in `.pi-web/tasks.json`:
"version": 1,
"tasks": [
{
"id": "docker.start",
"title": "Start Docker",
"group": "Docker",
"description": "Start the local Docker Compose environment.",
"command": "./docker/pi-web-docker --dev start"
"id": "app.start",
"title": "Start app",
"group": "Development",
"description": "Start the local development server.",
"command": "npm run dev"
},
{
"id": "db.reset",
@@ -743,7 +743,7 @@ Labels should use the same helper through a plugin-owned cache because `items()`
const envCache = new Map();
function envKey(machine, workspace) {
return `${machine.id}:${workspace.id}:docker/development.be-go.local.env`;
return `${machine.id}:${workspace.id}:.env.local`;
}
function loadEnvLabel(context) {
@@ -753,7 +753,7 @@ function loadEnvLabel(context) {
const pending = { status: "loading", label: undefined };
envCache.set(key, pending);
context.files.readFile("docker/development.be-go.local.env")
context.files.readFile(".env.local")
.then((file) => {
pending.status = "ready";
pending.label = file.content.match(/^DEV_URL=(.+)$/m)?.[1];
+18 -8
View File
@@ -8,17 +8,27 @@ const repoRoot = resolve(dirname(fileURLToPath(import.meta.url)), "..", "..");
const dockerOneLine = "curl -fsSL https://raw.githubusercontent.com/jmfederico/pi-web/main/docker/install.sh | sh";
describe("pi-web-docker documentation", () => {
it("documents the Docker one-line install in the Docker guide, root README, and install page", async () => {
const [dockerReadme, rootReadme, installPage] = await Promise.all([
readRepoFile("docker/README.md"),
readRepoFile("README.md"),
readRepoFile("docs/install.html"),
]);
it("documents the Docker one-line install in the Docker guide", async () => {
const dockerReadme = await readRepoFile("docker/README.md");
expect(dockerReadme).toContain(dockerOneLine);
expect(dockerReadme).toContain("does not require Node.js or npm on the host");
expect(rootReadme).toContain(dockerOneLine);
expect(installPage).toContain(dockerOneLine);
});
it("keeps Docker setup documentation scoped to the Docker folder", async () => {
const nonDockerDocs = await Promise.all([
readRepoFile("README.md"),
readRepoFile("docs/install.html"),
readRepoFile("docs/plugins.md"),
readRepoFile("docs/plugins.html"),
]);
for (const content of nonDockerDocs) {
expect(content).not.toContain(dockerOneLine);
expect(content).not.toContain("pi-web-docker");
expect(content).not.toContain("Docker beta");
expect(content).not.toContain("Docker guide");
}
});
it("keeps the Docker command matrix aligned with the canonical user command surface", async () => {