Archived
docs: keep Docker setup docs scoped
This commit is contained in:
@@ -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.
|
|
||||||
@@ -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.
|
|
||||||
@@ -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`.
|
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
|
## Core model
|
||||||
|
|
||||||
PI WEB organizes work like this:
|
PI WEB organizes work like this:
|
||||||
|
|||||||
@@ -92,7 +92,6 @@
|
|||||||
<a href="#requirements">Requirements</a>
|
<a href="#requirements">Requirements</a>
|
||||||
<a href="#user-services">User service install</a>
|
<a href="#user-services">User service install</a>
|
||||||
<a href="#one-line">One-line 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="#pi-package">Install through Pi</a>
|
||||||
<a href="#manual-run">WSL / manual run</a>
|
<a href="#manual-run">WSL / manual run</a>
|
||||||
<a href="#remote-access">Remote access</a>
|
<a href="#remote-access">Remote access</a>
|
||||||
@@ -150,27 +149,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</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 <command></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">
|
<section id="pi-package">
|
||||||
<h2>Install through Pi</h2>
|
<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>
|
<p>PI WEB is also published as a Pi package. This exposes a <code>/pi-web</code> command inside Pi.</p>
|
||||||
|
|||||||
+6
-8
@@ -212,9 +212,7 @@ After editing, check the manifest endpoint and browser-console failure cases.</c
|
|||||||
<p>
|
<p>
|
||||||
<strong>Updates</strong> adds a conditional <strong>Updates</strong> workspace tab with PI WEB update,
|
<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
|
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
|
selected machine's plugin copy when machine federation is active.
|
||||||
manifest hint so federated gateways can keep the remote Updates tab visible and expose Docker commands
|
|
||||||
while gateway status parsing catches up.
|
|
||||||
</p>
|
</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Plugin id: <code>updates</code></li>
|
<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,
|
"version": 1,
|
||||||
"tasks": [
|
"tasks": [
|
||||||
{
|
{
|
||||||
"id": "docker.start",
|
"id": "app.start",
|
||||||
"title": "Start Docker",
|
"title": "Start app",
|
||||||
"group": "Docker",
|
"group": "Development",
|
||||||
"description": "Start the local Docker Compose environment.",
|
"description": "Start the local development server.",
|
||||||
"command": "./docker/pi-web-docker --dev start"
|
"command": "npm run dev"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "db.reset",
|
"id": "db.reset",
|
||||||
|
|||||||
+8
-8
@@ -190,7 +190,7 @@ Built-in plugins can be managed from **Settings → Plugins** or with the top-le
|
|||||||
**Plugin id:** `updates`
|
**Plugin id:** `updates`
|
||||||
**What it does:** adds a conditional **Updates** workspace tab with PI WEB update, restart, and installed-service guidance.
|
**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
|
```json
|
||||||
{
|
{
|
||||||
@@ -223,11 +223,11 @@ Configure workspace tasks in `.pi-web/tasks.json`:
|
|||||||
"version": 1,
|
"version": 1,
|
||||||
"tasks": [
|
"tasks": [
|
||||||
{
|
{
|
||||||
"id": "docker.start",
|
"id": "app.start",
|
||||||
"title": "Start Docker",
|
"title": "Start app",
|
||||||
"group": "Docker",
|
"group": "Development",
|
||||||
"description": "Start the local Docker Compose environment.",
|
"description": "Start the local development server.",
|
||||||
"command": "./docker/pi-web-docker --dev start"
|
"command": "npm run dev"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "db.reset",
|
"id": "db.reset",
|
||||||
@@ -743,7 +743,7 @@ Labels should use the same helper through a plugin-owned cache because `items()`
|
|||||||
const envCache = new Map();
|
const envCache = new Map();
|
||||||
|
|
||||||
function envKey(machine, workspace) {
|
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) {
|
function loadEnvLabel(context) {
|
||||||
@@ -753,7 +753,7 @@ function loadEnvLabel(context) {
|
|||||||
|
|
||||||
const pending = { status: "loading", label: undefined };
|
const pending = { status: "loading", label: undefined };
|
||||||
envCache.set(key, pending);
|
envCache.set(key, pending);
|
||||||
context.files.readFile("docker/development.be-go.local.env")
|
context.files.readFile(".env.local")
|
||||||
.then((file) => {
|
.then((file) => {
|
||||||
pending.status = "ready";
|
pending.status = "ready";
|
||||||
pending.label = file.content.match(/^DEV_URL=(.+)$/m)?.[1];
|
pending.label = file.content.match(/^DEV_URL=(.+)$/m)?.[1];
|
||||||
|
|||||||
@@ -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";
|
const dockerOneLine = "curl -fsSL https://raw.githubusercontent.com/jmfederico/pi-web/main/docker/install.sh | sh";
|
||||||
|
|
||||||
describe("pi-web-docker documentation", () => {
|
describe("pi-web-docker documentation", () => {
|
||||||
it("documents the Docker one-line install in the Docker guide, root README, and install page", async () => {
|
it("documents the Docker one-line install in the Docker guide", async () => {
|
||||||
const [dockerReadme, rootReadme, installPage] = await Promise.all([
|
const dockerReadme = await readRepoFile("docker/README.md");
|
||||||
readRepoFile("docker/README.md"),
|
|
||||||
readRepoFile("README.md"),
|
|
||||||
readRepoFile("docs/install.html"),
|
|
||||||
]);
|
|
||||||
|
|
||||||
expect(dockerReadme).toContain(dockerOneLine);
|
expect(dockerReadme).toContain(dockerOneLine);
|
||||||
expect(dockerReadme).toContain("does not require Node.js or npm on the host");
|
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 () => {
|
it("keeps the Docker command matrix aligned with the canonical user command surface", async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user