Env-var overrides for offline/air-gapped installs (update check, plugin catalog, updater)#7917
Env-var overrides for offline/air-gapped installs (update check, plugin catalog, updater)#7917JohnMcLear wants to merge 3 commits into
Conversation
…ater (offline installs)
Air-gapped and firewalled deployments could not disable Etherpad's outbound
calls (the hourly version check, the admin plugin catalogue, and the
self-updater) without editing settings.json inside the container image — the
shipped settings.json.docker hardcoded updates.tier and omitted the privacy
block entirely, so there was no env-var to flip.
Wire the relevant keys through the existing ${ENV:default} substitution in both
settings.json.docker and settings.json.template:
- PRIVACY_UPDATE_CHECK (privacy.updateCheck, default true)
- PRIVACY_PLUGIN_CATALOG (privacy.pluginCatalog, default true)
- UPDATES_TIER (updates.tier, default notify; "off" = no calls)
- UPDATES_SOURCE / UPDATES_CHANNEL / UPDATES_CHECK_INTERVAL_HOURS /
UPDATES_GITHUB_REPO / UPDATES_REQUIRE_ADMIN_FOR_STATUS (docker)
- UPDATE_SERVER (updateServer endpoint)
Document the full set in doc/docker.md (new "Updates & privacy" section) and
cross-link from doc/admin/updates.md. Add backend regression tests that parse
the shipped settings.json.docker and settings.json.template and assert the
overrides apply with correct boolean/numeric coercion, so a future edit that
drops the ${ENV} placeholders fails loudly.
Addresses #7911 (item 2). No code changes — config + docs + tests only.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
Code Review by Qodo
1.
|
- Outbound-call docs/comments referenced doc/privacy.md (the storage/logging
doc); the canonical outbound-call inventory is repo-root PRIVACY.md, which the
runtime messages in UpdateCheck.ts / Settings.ts also reference. Re-point
settings.json.{template,docker} and doc/docker.md there.
- doc/admin/updates.md said updates.tier="off" means "no HTTP request will leave
the instance", but the legacy UpdateCheck.ts call to ${updateServer}/info.json
is gated by privacy.updateCheck, not updates.tier. Clarify that air-gapped
installs must set PRIVACY_UPDATE_CHECK=false too.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Thanks Qodo — both findings actioned in 3a95519:
|
… check PRIVACY.md lives at the repo root, outside the doc/ tree VitePress builds, so a relative link to it (../PRIVACY.md / ../../PRIVACY.md) is flagged as a dead link and fails `docs:build`. Use the absolute GitHub URL instead, matching how doc/configuration.md already links settings.json.template. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
PR Summary by Qodo
Add env-var overrides to disable update checks & plugin catalog for offline installs
🐞 Bug fix⚙️ Configuration changes📝 Documentation🧪 Tests🕐 20-40 MinutesWalkthroughs
User Description
What
Addresses item 2 of #7911: air-gapped / firewalled deployments could not disable Etherpad's outbound calls purely via environment variables —
settings.json.dockerhardcodedupdates.tierand shipped noprivacyblock at all, so operators had to editsettings.jsoninside the image.This wires the relevant keys through the existing
${ENV:default}substitution (Settings.tslookupEnvironmentVariables) in both shipped settings files. No code changes — config + docs + tests only.New environment variables
PRIVACY_UPDATE_CHECKprivacy.updateChecktruePRIVACY_PLUGIN_CATALOGprivacy.pluginCatalogtrueUPDATES_TIERupdates.tier(off= no calls)notifyUPDATES_SOURCEupdates.sourcegithubUPDATES_CHANNELupdates.channelstableUPDATES_CHECK_INTERVAL_HOURSupdates.checkIntervalHours6UPDATES_GITHUB_REPOupdates.githubRepoether/etherpadUPDATES_REQUIRE_ADMIN_FOR_STATUSupdates.requireAdminForStatusfalseUPDATE_SERVERupdateServerhttps://etherpad.org/ep_infosFully offline:
UPDATES_TIER=off,PRIVACY_UPDATE_CHECK=false,PRIVACY_PLUGIN_CATALOG=false.Docs
doc/docker.md.doc/admin/updates.md"Disabling everything".Tests
Added backend regression tests (
src/tests/backend/specs/settings.ts) that parse the shippedsettings.json.dockerandsettings.json.templateand assert the overrides apply with correct boolean/numeric coercion — so a future edit that drops the${ENV}placeholders fails loudly.30 passing.Scope note
This is item 2 only. Item 1 (the
packageManager/corepack startup-failure claim) does not reproduce on the official Docker image ondevelop— it already installs pnpm vianpm(corepack was dropped for Node 25) and runsnodedirectly, with no package manager invoked at startup. Awaiting the reporter's confirmation of whether they hit it on the official image vs. a source build before touching anything there. See discussion on #7911.🤖 Generated with Claude Code
AI Description
• Expose update/privacy settings as env-var overrides for Docker and template installs. • Add offline/air-gapped documentation and cross-links for disabling all outbound calls. • Add regression tests to ensure shipped settings keep ${ENV:default} placeholders and type coercion.Diagram
High-Level Assessment
The following are alternative approaches to this PR:
1. Single OFFLINE/AIRGAPPED mode flag
2. Docker entrypoint rewrites settings.json at startup
Recommendation: The chosen approach (adding ${ENV:default} placeholders to shipped settings templates and enforcing them via regression tests) is the best fit: it reuses the existing Settings.ts substitution/coercion logic, avoids runtime behavior changes, and works consistently for both Docker and source installs. A single OFFLINE flag could be considered later as a convenience wrapper, but the current granular env vars are more flexible and lower-risk.
File Changes
Tests (1)
Documentation (2)
Other (2)