refactor(etherpad): address review feedback

- Replace manual tag lookup + git clone/checkout with
  fetch_and_deploy_gh_release (tarball mode) for both install and update
  paths, matching repo convention (see ct/clickhouse.sh).
- Drop git, curl, ca-certificates from apt deps — base image ships them
  and the helper no longer needs git.
- Remove the id -u etherpad guard; fresh LXC will not have the user.
- Bump Debian from 12 to 13 (trixie).
- Switch logo to selfh.st/icons webp.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
John McLear
2026-04-20 17:39:09 +01:00
parent 53d15c56d7
commit e56def8ad6
3 changed files with 9 additions and 23 deletions

View File

@@ -11,7 +11,7 @@ var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}"
var_disk="${var_disk:-8}"
var_os="${var_os:-debian}"
var_version="${var_version:-12}"
var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
@@ -39,16 +39,15 @@ function update_script() {
[ -d /opt/etherpad-lite/var ] && cp -a /opt/etherpad-lite/var /opt/etherpad-var.bak
msg_ok "Backed up Configuration"
LATEST_TAG=$(curl -fsSL https://api.github.com/repos/ether/etherpad-lite/releases/latest | grep -oP '"tag_name":\s*"\K[^"]+')
msg_info "Updating to ${LATEST_TAG}"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "etherpad-lite" "ether/etherpad-lite" "tarball" "latest" "/opt/etherpad-lite"
msg_info "Rebuilding Etherpad"
cd /opt/etherpad-lite
$STD git fetch --tags --prune
$STD git checkout "${LATEST_TAG}"
export COREPACK_ENABLE_DOWNLOAD_PROMPT=0
$STD corepack enable
$STD pnpm install --frozen-lockfile
$STD pnpm run build:etherpad
msg_ok "Updated to ${LATEST_TAG}"
msg_ok "Rebuilt Etherpad"
msg_info "Restoring Configuration"
[ -f /opt/etherpad-settings.json.bak ] && mv /opt/etherpad-settings.json.bak /opt/etherpad-lite/settings.json

View File

@@ -15,9 +15,6 @@ update_os
msg_info "Installing Dependencies"
$STD apt install -y \
git \
curl \
ca-certificates \
build-essential \
pkg-config \
libsqlite3-dev
@@ -31,20 +28,10 @@ $STD corepack enable
msg_ok "Enabled pnpm"
msg_info "Creating etherpad User"
if ! id -u etherpad >/dev/null 2>&1; then
useradd --system --create-home --home-dir /var/lib/etherpad --shell /usr/sbin/nologin etherpad
fi
useradd --system --create-home --home-dir /var/lib/etherpad --shell /usr/sbin/nologin etherpad
msg_ok "Created etherpad User"
msg_info "Cloning Etherpad"
LATEST_TAG=$(curl -fsSL https://api.github.com/repos/ether/etherpad-lite/releases/latest | grep -oP '"tag_name":\s*"\K[^"]+')
if [ -z "${LATEST_TAG}" ]; then
msg_error "Unable to determine latest Etherpad release"
exit 1
fi
$STD git clone --depth 1 --branch "${LATEST_TAG}" https://github.com/ether/etherpad-lite.git /opt/etherpad-lite
echo "${LATEST_TAG}" >/opt/etherpad-lite/.version
msg_ok "Cloned Etherpad ${LATEST_TAG}"
fetch_and_deploy_gh_release "etherpad-lite" "ether/etherpad-lite" "tarball" "latest" "/opt/etherpad-lite"
msg_info "Building Etherpad"
cd /opt/etherpad-lite

View File

@@ -11,7 +11,7 @@
"interface_port": 9001,
"documentation": "https://etherpad.org/doc",
"website": "https://etherpad.org",
"logo": "https://raw.githubusercontent.com/ether/etherpad-lite/develop/src/static/favicon.ico",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/etherpad.webp",
"description": "Etherpad is a highly customizable real-time collaborative document editor. It lets multiple people edit the same document simultaneously in the browser, with live changes, per-user colors, chat, and a rich plugin ecosystem.",
"install_methods": [
{
@@ -23,7 +23,7 @@
"ram": 2048,
"hdd": 8,
"os": "Debian",
"version": "12"
"version": "13"
}
}
],