feat(packaging): add Home Assistant add-on scaffold#7560
feat(packaging): add Home Assistant add-on scaffold#7560JohnMcLear wants to merge 3 commits intoether:developfrom
Conversation
Scaffolds a Home Assistant add-on under packaging/home-assistant/ that
wraps the existing etherpad/etherpad:2.6.1 Docker image, enabling
one-click install from the HA Add-on Store.
- repository.yaml declares the Etherpad add-on collection.
- etherpad/config.yaml: ingress support, per-arch image reference, and
schema-validated options for title, authentication, admin password,
default pad text, DB backend, and log level. Arch list (amd64,
aarch64) matches docker.yml's upstream matrix.
- etherpad/Dockerfile: two-stage build that copies /opt/etherpad-lite
out of the upstream image (both the upstream and HA base are Alpine,
so the tree is drop-in compatible). Avoids duplicating the 200-line
upstream build.
- rootfs/etc/cont-init.d/10-etherpad.sh: reads /data/options.json via
bashio and exports env vars. Etherpad's built-in ${ENV:default}
substitution in settings.json.template picks them up directly — no
settings.json rewrite needed.
- rootfs/etc/services.d/etherpad/{run,finish}: s6-overlay v3 service
wiring for long-running Etherpad + clean exit/crash handling.
- README.md documents install steps, configuration, ingress caveats,
and the plaintext-password security note.
- CHANGELOG.md initial entry for 2.6.1.
- .github/workflows/hassio-addon.yml: lints via frenck/action-addon-linter,
multi-arch builds amd64 + aarch64 via home-assistant/builder, pushes
to GHCR on non-PR events.
Not included (follow-up): icon.png (128×128) and logo.png (250×100);
publication route — either split to ether/home-assistant-addon-etherpad
or submit to hassio-addons/repository for discovery.
Refs ether#7529
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Review Summary by QodoAdd Home Assistant add-on scaffold for Etherpad
WalkthroughsDescription• Scaffolds Home Assistant add-on wrapping upstream Etherpad Docker image • Implements configuration via HA options with ingress proxy support • Adds multi-arch CI/CD pipeline for amd64 and aarch64 builds • Includes s6-overlay service management and environment variable rendering Diagramflowchart LR
A["HA Options<br/>config.yaml"] -->|bashio reads| B["10-etherpad.sh<br/>renders env"]
B -->|exports vars| C["Etherpad<br/>settings.json"]
D["Upstream Image<br/>etherpad:2.6.1"] -->|two-stage copy| E["HA Dockerfile<br/>Alpine base"]
E -->|s6-overlay| F["run/finish<br/>service scripts"]
F -->|starts| G["Etherpad Process<br/>port 9001"]
H["hassio-addon.yml<br/>CI workflow"] -->|lints| I["frenck/action-addon-linter"]
H -->|builds| J["home-assistant/builder<br/>multi-arch"]
J -->|pushes| K["GHCR<br/>ghcr.io/ether/..."]
File Changes1. packaging/home-assistant/repository.yaml
|
Code Review by Qodo
1.
|
The hassio-addon linter rejects keys that match their default value: - boot, hassio_api, homeassistant_api, host_network, startup Remove them; all land on their documented defaults. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ndent Addresses Qodo review feedback on ether#7560: 1. `init: false` was suppressing s6-overlay's own PID-1 init sequence in some HA base image variants, which would prevent `/etc/cont-init.d/*` and `/etc/services.d/*` from running and leave the container without an Etherpad process. HA's default (`init: true` on most bases) plays nicely with s6-overlay — drop the explicit override and let the base image do the right thing. 2. README documented a one-click install path against `https://github.com/ether/etherpad-lite`, but HA's Add-on Store looks for `repository.yaml` at the repo root, which is not the case here (it sits under packaging/home-assistant/). Replace that install section with a prominent note that publication is a follow-up and link to the two viable destinations (dedicated repo / umbrella hassio-addons/repository). 3. Indentation: reflow cont-init and finish scripts from 4-space to 2-space to match the repo style rule. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Qodo's |
Summary
Scaffolds a Home Assistant add-on under
packaging/home-assistant/that wraps the existingetherpad/etherpad:2.6.1Docker image, enabling one-click install from the HA Add-on Store.Part of #7529 — this was the specific target called out in the issue ("Software like home assistant could easily run etherpad in a docker container…"). Pairs with #7558 (Snap) and #7559 (Apt).
What's included
repository.yamldeclaring the Etherpad add-on collection.etherpad/config.yamlwith ingress support, per-arch image reference, and schema-validated options fortitle, authentication, admin password, default pad text, DB backend, and log level.etherpad/Dockerfile— two-stage build that copies/opt/etherpad-liteout of the upstream image (both the upstream image and HA base are Alpine, so the tree is drop-in compatible). Avoids duplicating the 200-line upstream build.cont-init.d+services.dscripts that read HA's/data/options.jsonviabashioand export env vars. Etherpad's built-in${ENV:default}substitution (seesettings.json.templateheader) picks them up directly — nosettings.jsonrewrite needed.README.md+CHANGELOG.mdfor the Add-on Store UI..github/workflows/hassio-addon.yml—frenck/action-addon-linter+ multi-arch build viahome-assistant/builder, pushed to GHCR. Arch list (amd64, aarch64) matches the existingdocker.ymlmatrix.Not included (follow-up)
icon.png(128×128) andlogo.png(250×100) — spec noted in the README; needs brand assets.ether/home-assistant-addon-etherpadrepo and self-publish — users add the repo URL in HA.hassio-addons/repository— see their contribution guide.Recommendation: do both — (a) is under our control, (b) gets instant reach.
Risks / unknowns
trustProxy+X-Forwarded-*headers, which should work for HTTP + websockets but may have edge-case breakage. Fallback: direct port 9001 (documented in the README).ep_hash_authvia a later iteration.node:lts), the Dockerfile must switch to installing from source inside the HA base. Flagged in the Dockerfile comment.Test plan
action-addon-linterpasses in CIhome-assistant/builderproduces images for amd64 and aarch64/data/dirty.db)admin_password, log into/admin, confirm accessdb_type: postgreswith valid credentials, confirm Etherpad connectsRefs #7529
🤖 Generated with Claude Code