mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2026-11-24 14:47:46 +00:00
Updates run without a terminal (update-apps, pct exec, cron) hit bare read prompts and failed with 'read exited 1'. - komodo, alpine-komodo, dockge, dokploy, runtipi, cockpit: prompt_confirm, so the default (legacy update, no 45Drives extras) applies unattended - bichon (low space), semaphore (BoltDB migration): exit 75 unattended, which update-apps reports as skipped - termix: unattended keeps the current Nginx config - gitea-mirror, jellyseerr, overseerr, paperless-ngx, vikunja, zabbix: the PHS_SILENT guards now use is_unattended, so a missing terminal counts too
73 lines
2.4 KiB
Bash
73 lines
2.4 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://dokploy.com/
|
|
|
|
APP="Dokploy"
|
|
var_tags="${var_tags:-docker;paas}"
|
|
var_cpu="${var_cpu:-2}"
|
|
var_ram="${var_ram:-2048}"
|
|
var_disk="${var_disk:-10}"
|
|
var_os="${var_os:-debian}"
|
|
var_version="${var_version:-13}"
|
|
var_arm64="${var_arm64:-yes}"
|
|
var_unprivileged="${var_unprivileged:-0}"
|
|
|
|
header_info "$APP"
|
|
variables
|
|
color
|
|
catch_errors
|
|
|
|
ADDON_SCRIPT="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/addon/dokploy.sh"
|
|
|
|
function update_script() {
|
|
header_info
|
|
check_container_storage
|
|
check_container_resources
|
|
|
|
if [[ ! -d /etc/dokploy ]]; then
|
|
msg_error "No ${APP} Installation Found!"
|
|
exit
|
|
fi
|
|
|
|
msg_warn "⚠️ ${APP} has been migrated to an addon script."
|
|
echo ""
|
|
echo -e "${INFO}${YW}This is a one-time migration. After this, you can update ${APP} anytime with:${CL}"
|
|
echo -e "${TAB}${TAB}${GN}update_dokploy${CL} or ${GN}bash <(curl -fsSL ${ADDON_SCRIPT})${CL}"
|
|
echo ""
|
|
if ! prompt_confirm "${TAB}Migrate update function now?" "n"; then
|
|
msg_warn "Migration skipped. The old update will continue to work for now."
|
|
msg_info "Updating ${APP} (legacy)"
|
|
curl -sSL https://dokploy.com/install.sh | $STD bash -s update
|
|
msg_ok "Updated ${APP}"
|
|
exit
|
|
fi
|
|
|
|
msg_info "Migrating update function"
|
|
TMP_UPDATE=$(mktemp)
|
|
cat <<'MIGRATION_EOF' >"$TMP_UPDATE"
|
|
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/addon/dokploy.sh)"
|
|
MIGRATION_EOF
|
|
mv "$TMP_UPDATE" /usr/bin/update
|
|
chmod +x /usr/bin/update
|
|
|
|
ln -sf /usr/bin/update /usr/bin/update_dokploy 2>/dev/null || true
|
|
msg_ok "Migration complete"
|
|
|
|
echo -e "${INFO}${YW}Running addon update${CL}"
|
|
type=update bash <(curl -fsSL "${ADDON_SCRIPT}")
|
|
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}"
|