mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-02-03 20:03:25 +01:00
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:
committed by
GitHub
parent
f0a291542d
commit
7234ecc406
@@ -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
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
# Source: https://couchdb.apache.org/
|
# Source: https://couchdb.apache.org/
|
||||||
|
|
||||||
APP="Apache-CouchDB"
|
APP="Apache CouchDB"
|
||||||
var_tags="${var_tags:-database}"
|
var_tags="${var_tags:-database}"
|
||||||
var_cpu="${var_cpu:-2}"
|
var_cpu="${var_cpu:-2}"
|
||||||
var_ram="${var_ram:-4096}"
|
var_ram="${var_ram:-4096}"
|
||||||
var_disk="${var_disk:-10}"
|
var_disk="${var_disk:-10}"
|
||||||
var_os="${var_os:-debian}"
|
var_os="${var_os:-debian}"
|
||||||
var_version="${var_version:-12}"
|
var_version="${var_version:-13}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
@@ -20,15 +20,19 @@ color
|
|||||||
catch_errors
|
catch_errors
|
||||||
|
|
||||||
function update_script() {
|
function update_script() {
|
||||||
header_info
|
header_info
|
||||||
check_container_storage
|
check_container_storage
|
||||||
check_container_resources
|
check_container_resources
|
||||||
if [[ ! -f /etc/systemd/system/couchdb.service ]]; then
|
if [[ ! -f /usr/lib/systemd/system/couchdb.service ]]; then
|
||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
|
||||||
fi
|
|
||||||
msg_error "Currently we don't provide an update function for this ${APP}."
|
|
||||||
exit
|
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
|
start
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
{
|
{
|
||||||
"name": "Apache-CouchDB",
|
"name": "Apache CouchDB",
|
||||||
"slug": "apache-couchdb",
|
"slug": "apache-couchdb",
|
||||||
"categories": [
|
"categories": [
|
||||||
8
|
8
|
||||||
],
|
],
|
||||||
"date_created": "2024-05-02",
|
"date_created": "2024-05-02",
|
||||||
"type": "ct",
|
"type": "ct",
|
||||||
"updateable": false,
|
"updateable": true,
|
||||||
"privileged": false,
|
"privileged": false,
|
||||||
"interface_port": 5984,
|
"interface_port": 5984,
|
||||||
"documentation": "https://docs.couchdb.org/en/stable/",
|
"documentation": "https://docs.couchdb.org/en/stable/",
|
||||||
"website": "https://couchdb.apache.org/",
|
"website": "https://couchdb.apache.org/",
|
||||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/couchdb.webp",
|
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/couchdb.webp",
|
||||||
"config_path": "etc/default.ini",
|
"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": [
|
"install_methods": [
|
||||||
{
|
{
|
||||||
"type": "default",
|
"type": "default",
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
"ram": 4096,
|
"ram": 4096,
|
||||||
"hdd": 10,
|
"hdd": 10,
|
||||||
"os": "debian",
|
"os": "debian",
|
||||||
"version": "12"
|
"version": "13"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
},
|
},
|
||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Show Login Credentials: `cat CouchDB.creds`",
|
"text": "Login Credentials: `cat ~/couchdb.creds`",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -13,10 +13,6 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
|
||||||
$STD apt-get install -y apt-transport-https
|
|
||||||
msg_ok "Installed Dependencies"
|
|
||||||
|
|
||||||
msg_info "Installing Apache CouchDB"
|
msg_info "Installing Apache CouchDB"
|
||||||
ERLANG_COOKIE=$(openssl rand -base64 32)
|
ERLANG_COOKIE=$(openssl rand -base64 32)
|
||||||
ADMIN_PASS="$(openssl rand -base64 18 | cut -c1-13)"
|
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/bindaddress string 0.0.0.0"
|
||||||
debconf-set-selections <<<"couchdb couchdb/adminpass password $ADMIN_PASS"
|
debconf-set-selections <<<"couchdb couchdb/adminpass password $ADMIN_PASS"
|
||||||
debconf-set-selections <<<"couchdb couchdb/adminpass_again 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
|
setup_deb822_repo \
|
||||||
VERSION_CODENAME="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)"
|
"couchdb" \
|
||||||
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
|
"https://couchdb.apache.org/repo/keys.asc" \
|
||||||
$STD apt-get update
|
"https://apache.jfrog.io/artifactory/couchdb-deb" \
|
||||||
$STD apt-get install -y couchdb
|
"$(get_os_info codename)" \
|
||||||
echo -e "CouchDB Erlang Cookie: \e[32m$ERLANG_COOKIE\e[0m" >>~/CouchDB.creds
|
"main"
|
||||||
echo -e "CouchDB Admin Password: \e[32m$ADMIN_PASS\e[0m" >>~/CouchDB.creds
|
$STD apt install -y couchdb
|
||||||
msg_ok "Installed Apache 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
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
|||||||
Reference in New Issue
Block a user