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
This commit is contained in:
CanbiZ (MickLesk)
2026-01-12 13:22:50 +01:00
committed by GitHub
parent f0a291542d
commit 7234ecc406
3 changed files with 32 additions and 27 deletions

View File

@@ -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

View File

@@ -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"
}
]

View File

@@ -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