mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-12-04 21:02:25 +01:00
The Alpine installs put Compose into /root/.docker/cli-plugins by curl. Nothing updated it afterwards (the update is apk -U upgrade), and the CLI prefers that directory over the package path. Install docker-cli-compose instead, and on update move existing containers to the package before removing the old binary.
56 lines
1.8 KiB
Bash
56 lines
1.8 KiB
Bash
#!/usr/bin/env bash
|
|
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
|
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
|
# Copyright (c) 2021-2026 community-scripts ORG
|
|
# Author: MickLesk (CanbiZ)
|
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
# Source: https://github.com/ZoeyVid/NPMplus
|
|
|
|
APP="NPMplus"
|
|
var_tags="${var_tags:-proxy;nginx}"
|
|
var_cpu="${var_cpu:-1}"
|
|
var_ram="${var_ram:-512}"
|
|
var_disk="${var_disk:-3}"
|
|
var_os="${var_os:-alpine}"
|
|
var_version="${var_version:-3.24}"
|
|
var_arm64="${var_arm64:-yes}"
|
|
var_unprivileged="${var_unprivileged:-1}"
|
|
|
|
header_info "$APP"
|
|
variables
|
|
color
|
|
catch_errors
|
|
|
|
function update_script() {
|
|
msg_info "Updating Alpine OS"
|
|
$STD apk -U upgrade
|
|
msg_ok "System updated"
|
|
|
|
if [[ -f /root/.docker/cli-plugins/docker-compose ]]; then
|
|
msg_info "Migrating Docker Compose to the Alpine package"
|
|
if apk info -e docker-cli-compose &>/dev/null || $STD apk add docker-cli-compose; then
|
|
rm -f /root/.docker/cli-plugins/docker-compose
|
|
msg_ok "Migrated Docker Compose to the Alpine package"
|
|
else
|
|
msg_warn "Could not install docker-cli-compose, keeping the old Compose binary"
|
|
fi
|
|
fi
|
|
|
|
msg_info "Pulling latest NPMplus container image"
|
|
cd /opt
|
|
$STD docker compose pull
|
|
$STD docker compose up -d
|
|
msg_ok "Updated NPMplus container"
|
|
msg_ok "Updated successfully!"
|
|
exit
|
|
}
|
|
|
|
start
|
|
build_container
|
|
description
|
|
|
|
msg_ok "Completed successfully!\n"
|
|
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
|
echo -e "${INFO}${YW}Access it using the following URL:${CL}"
|
|
echo -e "${GATEWAY}${BGN}https://${IP}:81${CL}"
|