Install and update from the admin page: repo catalog, module version requirements, shell updates
ProdDash now has a version (package.json, 1.1.0) and modules declare the
shell versions they need ("proddash": ">=1.1.0" in the manifest). A module
whose requirement this shell doesn't meet is listed in the admin page but
never loaded, and cannot be installed from the catalog.
Modules come from two places: bundled with the checkout (modules/) and
installed from the admin page into the data directory (<data dir>/modules/).
Same id in both → the newer version runs; a downloaded copy the bundled one
has overtaken is removed. The admin page's new "Available modules" section
lists modules in the ProdDash repo that aren't installed here — one small
tar.gz of the branch is fetched (at most every few minutes, only while the
admin page is open or for the periodic update check) and read with a
dependency-free tar reader (ustar, GNU long names, pax headers; the pax
global comment carries the commit sha). Install downloads the module folder
into the data directory and mounts it immediately; a module card offers
"Update to vX" when the repo has a newer version. Uninstall removes an
installed module's files; a bundled module is hidden instead (its folder
belongs to the app) and can be restored from Available modules without a
download. Settings are kept across uninstall/reinstall.
Shell updates: the server compares the repo's package.json version and
commit sha with its own (git rev-parse when the app folder is a checkout),
shows a banner in the admin page, and "Update now" brings the app folder up
to date — git pull --ff-only for a checkout that is on the repo branch with
no local changes (file modes ignored), otherwise the archive is unpacked over
the folder (runtime state and .git untouched). The server then exits with
code 75 and starts its own replacement unless PRODDASH_LAUNCHER is set; the
replacement waits for the port to free up (EADDRINUSE retry). The page polls
until the new version answers. PRODDASH_REPO (owner/repo#branch),
PRODDASH_ARCHIVE_BASE and PRODDASH_NO_REMOTE_CHECK configure/disable it.
Docs: MODULE-GUIDE gets the rules every module follows (all settings in the
admin page, dependencies shipped inside the module, everything runs inside
the module's server entry — no helper programs, declare the ProdDash
requirement and bump the version), the proddash/version manifest fields and
the new installation story; README gets "Installing modules and updating";
CLAUDE.md summarises the rules.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNYUv9EyrGSFmCnmH7WYKH
This commit is contained in:
@@ -65,8 +65,9 @@ the app folder from `main` and start the new version with everything still
|
||||
configured. The admin page shows the exact path in use, and the server prints
|
||||
it at startup (`Settings : …`).
|
||||
|
||||
The directory holds `modules.json` (module config) and `layouts/` (named
|
||||
layouts), both written by the app itself. It may also hold a `proddash.json`
|
||||
The directory holds `modules.json` (module config), `layouts/` (named
|
||||
layouts) and `modules/` (modules installed from the admin page), all written
|
||||
by the app itself. It may also hold a `proddash.json`
|
||||
with this machine's shell settings — the same keys as the checked-in
|
||||
[config/proddash.json](config/proddash.json), which supplies the defaults:
|
||||
|
||||
@@ -86,6 +87,47 @@ so and falls back to the app's `config/` folder.
|
||||
directory, so nothing has to be re-entered. The old files are left in place and
|
||||
ignored from then on.
|
||||
|
||||
## Installing modules and updating
|
||||
|
||||
Everything below happens in the **admin page**; ProdDash talks to its GitHub
|
||||
repository (`michaelmcgary2008/ProdDash`, branch `main` — change with
|
||||
`repo` / `branch` in `proddash.json` or the `PRODDASH_REPO` variable,
|
||||
`owner/repo#branch`). It downloads one small archive of the branch, at most
|
||||
every few minutes, only while the admin page is open or for the update check
|
||||
below. Nothing is installed without someone clicking.
|
||||
|
||||
- **Available modules** lists modules in the repo that aren't installed
|
||||
here. **Install** downloads the module into the data directory's `modules/`
|
||||
and starts it right away — nothing is written into the app folder, and no
|
||||
restart is needed. Modules that ship with your copy of ProdDash are
|
||||
"bundled"; ones you installed are "installed"; if both exist, the newer
|
||||
version runs.
|
||||
- **Uninstall** on a module card removes an installed module's files. For a
|
||||
bundled module (its folder belongs to the app) it hides the module from
|
||||
every dashboard instead; it reappears under Available modules and can be
|
||||
brought back without downloading. Settings are kept either way.
|
||||
- **Module updates**: when the repo has a newer version of an installed
|
||||
module, its card shows **Update to vX**.
|
||||
- **Version requirements**: every module declares the ProdDash versions it
|
||||
needs (`"proddash": ">=1.1.0"` in its manifest). A module that needs a
|
||||
newer shell is listed but not loaded, and cannot be installed until
|
||||
ProdDash is updated.
|
||||
- **ProdDash updates**: the admin page checks the repo shortly after start
|
||||
and every six hours, and shows a banner when `main` has a newer version
|
||||
(or new commits). **Update now** brings the app folder up to date and
|
||||
restarts the server; dashboards reconnect on their own. A git checkout is
|
||||
updated with `git pull --ff-only` (only when it is on the repo branch with
|
||||
no local changes — otherwise the banner says why and you update with git).
|
||||
A plain folder (no `.git`) has the repo archive unpacked over it; files
|
||||
removed upstream are left behind but harmless. Settings and layouts are
|
||||
never touched. **What changed** opens the commit comparison on GitHub.
|
||||
- **Restarting**: after an update the server exits with code 75 and starts
|
||||
its own replacement, which waits for the port to free up. If you supervise
|
||||
ProdDash with your own launcher, set `PRODDASH_LAUNCHER=1` so the server
|
||||
just exits and your launcher restarts it on exit code 75.
|
||||
`PRODDASH_NO_REMOTE_CHECK=1` turns off the periodic check (the admin page
|
||||
still checks when opened).
|
||||
|
||||
## Using the dashboard
|
||||
|
||||
- **+** — add any enabled module; multiple tiles of the same module are
|
||||
@@ -172,6 +214,7 @@ ProdDash/
|
||||
│ ├── clock/
|
||||
│ ├── prodcom-transcript/
|
||||
│ └── propresenter-now-next/ (carries its own copy of propresenter-core)
|
||||
├── package.json name + version (what the update check compares)
|
||||
├── config/ proddash.json defaults (runtime state lives in the
|
||||
│ per-machine data directory — see "Configure")
|
||||
├── docs/MODULE-GUIDE.md how to build and install a module
|
||||
|
||||
Reference in New Issue
Block a user