From 7234ecc406db4bc69d7a133d3b9b553938c56be5 Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Mon, 12 Jan 2026 13:22:50 +0100 Subject: [PATCH] Apache CouchDB: bump to debian 13 and add update support (#10721) * Apache CouchDB: bump to debian 13 and add update support Added update functionality to apache-couchdb.sh and marked CouchDB as updateable in the JSON metadata. Updated default OS version to 13 and improved credential file handling. Refactored the install script to use a helper for repository setup and standardized credential output. * fix naming --- ct/apache-couchdb.sh | 24 +++++++++++++---------- frontend/public/json/apache-couchdb.json | 10 +++++----- install/apache-couchdb-install.sh | 25 ++++++++++++------------ 3 files changed, 32 insertions(+), 27 deletions(-) diff --git a/ct/apache-couchdb.sh b/ct/apache-couchdb.sh index 9f16a1266..7093d3f72 100644 --- a/ct/apache-couchdb.sh +++ b/ct/apache-couchdb.sh @@ -5,13 +5,13 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://couchdb.apache.org/ -APP="Apache-CouchDB" +APP="Apache CouchDB" var_tags="${var_tags:-database}" var_cpu="${var_cpu:-2}" var_ram="${var_ram:-4096}" var_disk="${var_disk:-10}" var_os="${var_os:-debian}" -var_version="${var_version:-12}" +var_version="${var_version:-13}" var_unprivileged="${var_unprivileged:-1}" header_info "$APP" @@ -20,15 +20,19 @@ color catch_errors function update_script() { - header_info - check_container_storage - check_container_resources - if [[ ! -f /etc/systemd/system/couchdb.service ]]; then - msg_error "No ${APP} Installation Found!" - exit - fi - msg_error "Currently we don't provide an update function for this ${APP}." + header_info + check_container_storage + check_container_resources + if [[ ! -f /usr/lib/systemd/system/couchdb.service ]]; then + msg_error "No ${APP} Installation Found!" exit + fi + msg_info "Updating Apache CouchDB" + $STD apt-get update + $STD apt-get install -y --only-upgrade couchdb + msg_ok "Updated Apache CouchDB" + msg_ok "Updated successfully!" + exit } start diff --git a/frontend/public/json/apache-couchdb.json b/frontend/public/json/apache-couchdb.json index a79147a72..21bb6620d 100644 --- a/frontend/public/json/apache-couchdb.json +++ b/frontend/public/json/apache-couchdb.json @@ -1,19 +1,19 @@ { - "name": "Apache-CouchDB", + "name": "Apache CouchDB", "slug": "apache-couchdb", "categories": [ 8 ], "date_created": "2024-05-02", "type": "ct", - "updateable": false, + "updateable": true, "privileged": false, "interface_port": 5984, "documentation": "https://docs.couchdb.org/en/stable/", "website": "https://couchdb.apache.org/", "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/couchdb.webp", "config_path": "etc/default.ini", - "description": "Apache-CouchDB Seamless multi-master sync, that scales from Big Data to Mobile, with an Intuitive HTTP/JSON API and designed for Reliability.", + "description": "Apache CouchDB Seamless multi-master sync, that scales from Big Data to Mobile, with an Intuitive HTTP/JSON API and designed for Reliability.", "install_methods": [ { "type": "default", @@ -23,7 +23,7 @@ "ram": 4096, "hdd": 10, "os": "debian", - "version": "12" + "version": "13" } } ], @@ -33,7 +33,7 @@ }, "notes": [ { - "text": "Show Login Credentials: `cat CouchDB.creds`", + "text": "Login Credentials: `cat ~/couchdb.creds`", "type": "info" } ] diff --git a/install/apache-couchdb-install.sh b/install/apache-couchdb-install.sh index 97c667cd4..adec84033 100644 --- a/install/apache-couchdb-install.sh +++ b/install/apache-couchdb-install.sh @@ -13,10 +13,6 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apt-get install -y apt-transport-https -msg_ok "Installed Dependencies" - msg_info "Installing Apache CouchDB" ERLANG_COOKIE=$(openssl rand -base64 32) ADMIN_PASS="$(openssl rand -base64 18 | cut -c1-13)" @@ -25,14 +21,19 @@ debconf-set-selections <<<"couchdb couchdb/mode select standalone" debconf-set-selections <<<"couchdb couchdb/bindaddress string 0.0.0.0" debconf-set-selections <<<"couchdb couchdb/adminpass password $ADMIN_PASS" debconf-set-selections <<<"couchdb couchdb/adminpass_again password $ADMIN_PASS" -curl -fsSL https://couchdb.apache.org/repo/keys.asc | gpg --dearmor -o /usr/share/keyrings/couchdb-archive-keyring.gpg -VERSION_CODENAME="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" -echo "deb [signed-by=/usr/share/keyrings/couchdb-archive-keyring.gpg] https://apache.jfrog.io/artifactory/couchdb-deb/ ${VERSION_CODENAME} main" >/etc/apt/sources.list.d/couchdb.sources.list -$STD apt-get update -$STD apt-get install -y couchdb -echo -e "CouchDB Erlang Cookie: \e[32m$ERLANG_COOKIE\e[0m" >>~/CouchDB.creds -echo -e "CouchDB Admin Password: \e[32m$ADMIN_PASS\e[0m" >>~/CouchDB.creds -msg_ok "Installed Apache CouchDB." +setup_deb822_repo \ + "couchdb" \ + "https://couchdb.apache.org/repo/keys.asc" \ + "https://apache.jfrog.io/artifactory/couchdb-deb" \ + "$(get_os_info codename)" \ + "main" +$STD apt install -y couchdb +{ + echo "CouchDB Credentials" + echo "CouchDB Erlang Cookie: $ERLANG_COOKIE" + echo "CouchDB Admin Password: $ADMIN_PASS" +} >>~/couchdb.creds +msg_ok "Installed Apache CouchDB" motd_ssh customize