Use GH release deploy for SurrealDB

Replace the old curl-based installer and interactive update menu with unified GitHub release deployment helpers. ct/surrealdb.sh now checks for a new surrealdb release via check_for_gh_release, stops the service, uses fetch_and_deploy_gh_release to deploy the prebuilt binary to /usr/local/bin, sets exec permissions, and restarts the service (also use ${APP} in an error message). The previous menu-driven update and storage-switch options (memory vs rocksdb) were removed. install/surrealdb-install.sh now skips the removed mc dependency install, uses fetch_and_deploy_gh_release instead of the install.surrealdb.com script, makes the binary executable, and no longer writes a release-version file. Overall moves to a consistent release fetch/deploy flow and simplifies update/install logic.
This commit is contained in:
Poulette
2026-02-26 23:33:34 +01:00
parent c90a7dd972
commit 810902fce1
2 changed files with 14 additions and 54 deletions

View File

@@ -13,13 +13,9 @@ setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt install -y \
mc
msg_ok "Installed Dependencies"
msg_info "Installing SurrealDB"
$STD bash <(curl -sSf https://install.surrealdb.com)
fetch_and_deploy_gh_release "surrealdb" "surrealdb/surrealdb" "prebuild" "latest" "/usr/local/bin" "surreal-v*.linux-amd64.tgz"
chmod +x /usr/local/bin/surreal
msg_ok "Installed SurrealDB"
msg_info "Configuring SurrealDB"
@@ -54,9 +50,6 @@ EOF
systemctl enable -q --now surrealdb
msg_ok "Created Service"
RELEASE=$(curl -fsSL https://api.github.com/repos/surrealdb/surrealdb/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
echo "${RELEASE}" >/opt/SurrealDB_version.txt
motd_ssh
customize
cleanup_lxc