Files
ProxmoxVE/ct/umami.sh
T
Rene NulschandClaude Opus 5 3915f7a5c0 Umami: Align pnpm with engines.pnpm on update (#17404)
Umami 3.4.0 pins engines.pnpm to 12.3.4. update_script() never
refreshed pnpm, so containers installed with pnpm < 12 fail at
pnpm install with ERR_PNPM_UNSUPPORTED_ENGINE after the service was
already stopped and the old release replaced.

Read engines.pnpm from the deployed package.json and pass it to
setup_nodejs (same approach as ct/seerr.sh), falling back to latest.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-22 07:32:24 +02:00

68 lines
2.0 KiB
Bash

#!/usr/bin/env bash
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
_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 tteck
# Author: tteck (tteckster)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://umami.is/ | Github: https://github.com/umami-software/umami
APP="Umami"
var_tags="${var_tags:-analytics}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}"
var_disk="${var_disk:-12}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_arm64="${var_arm64:-yes}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/umami ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
if check_for_gh_release "umami" "umami-software/umami"; then
msg_info "Stopping Service"
systemctl stop umami
msg_ok "Stopped Service"
create_backup /opt/umami/.env
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "umami" "umami-software/umami" "tarball"
restore_backup
PNPM_VERSION=$(jq -r '.engines.pnpm // "latest"' /opt/umami/package.json)
NODE_VERSION="22" NODE_MODULE="pnpm@${PNPM_VERSION}" setup_nodejs
msg_info "Updating Umami"
cd /opt/umami
$STD pnpm install
$STD pnpm run build
msg_ok "Updated Umami"
msg_info "Starting Service"
systemctl start umami
msg_ok "Started Service"
msg_ok "Updated successfully!"
fi
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}http://${IP}:3000${CL}"