mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-08-09 14:19:15 +02:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d87e59f626 | |||
| d69579d477 |
Generated
+139
@@ -1,3 +1,142 @@
|
|||||||
|
## 2026-08-08
|
||||||
|
|
||||||
|
### 🆕 New Scripts
|
||||||
|
|
||||||
|
- Ignis ([#16330](https://github.com/community-scripts/ProxmoxVE/pull/16330))
|
||||||
|
|
||||||
|
### 💾 Core
|
||||||
|
|
||||||
|
- #### ✨ New Features
|
||||||
|
|
||||||
|
- core - setup_nodejs: bypass npm allowScripts policy globally on npm >=11 [@MickLesk](https://github.com/MickLesk) ([#16280](https://github.com/community-scripts/ProxmoxVE/pull/16280))
|
||||||
|
|
||||||
|
## 2026-08-07
|
||||||
|
|
||||||
|
### 🆕 New Scripts
|
||||||
|
|
||||||
|
- NetworkOptimizer ([#16328](https://github.com/community-scripts/ProxmoxVE/pull/16328))
|
||||||
|
- Orb ([#16329](https://github.com/community-scripts/ProxmoxVE/pull/16329))
|
||||||
|
|
||||||
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- #### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- HortusFox: start applying db migrations [@tomfrenzel](https://github.com/tomfrenzel) ([#16324](https://github.com/community-scripts/ProxmoxVE/pull/16324))
|
||||||
|
- Docker: report container updates instead of prompting, stop auto-updating Portainer Agent, fix addon detection of legacy Portainer [@MickLesk](https://github.com/MickLesk) ([#16298](https://github.com/community-scripts/ProxmoxVE/pull/16298))
|
||||||
|
- Immich: retry mise install on transient npm download failures [@MickLesk](https://github.com/MickLesk) ([#16301](https://github.com/community-scripts/ProxmoxVE/pull/16301))
|
||||||
|
- changedetection: remove msttcorefonts to fix install hang [@austinpilz](https://github.com/austinpilz) ([#16319](https://github.com/community-scripts/ProxmoxVE/pull/16319))
|
||||||
|
|
||||||
|
- #### 🔧 Refactor
|
||||||
|
|
||||||
|
- core: extend new vars and pocketbase values [@MickLesk](https://github.com/MickLesk) ([#16313](https://github.com/community-scripts/ProxmoxVE/pull/16313))
|
||||||
|
|
||||||
|
## 2026-08-06
|
||||||
|
|
||||||
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- #### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- paperless: change update abort message (endless spinner) [@MickLesk](https://github.com/MickLesk) ([#16299](https://github.com/community-scripts/ProxmoxVE/pull/16299))
|
||||||
|
|
||||||
|
- #### ✨ New Features
|
||||||
|
|
||||||
|
- Vikunja: remove version pin, v2.5.0 fixes the systemd syscall filter crash [@MickLesk](https://github.com/MickLesk) ([#16300](https://github.com/community-scripts/ProxmoxVE/pull/16300))
|
||||||
|
|
||||||
|
### 💾 Core
|
||||||
|
|
||||||
|
- #### 🔧 Refactor
|
||||||
|
|
||||||
|
- build.func: filter templates by host architecture during search [@MickLesk](https://github.com/MickLesk) ([#16302](https://github.com/community-scripts/ProxmoxVE/pull/16302))
|
||||||
|
|
||||||
|
## 2026-08-05
|
||||||
|
|
||||||
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- #### ✨ New Features
|
||||||
|
|
||||||
|
- NextcloudPI: Bump to Debian Trixie & Tweak broken SSH [@MickLesk](https://github.com/MickLesk) ([#15957](https://github.com/community-scripts/ProxmoxVE/pull/15957))
|
||||||
|
|
||||||
|
### 🧰 Tools
|
||||||
|
|
||||||
|
- #### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- fix(monitor-all): reduce polling CPU overhead [@jomplox](https://github.com/jomplox) ([#15907](https://github.com/community-scripts/ProxmoxVE/pull/15907))
|
||||||
|
|
||||||
|
## 2026-08-04
|
||||||
|
|
||||||
|
### 🆕 New Scripts
|
||||||
|
|
||||||
|
- Hister ([#16259](https://github.com/community-scripts/ProxmoxVE/pull/16259))
|
||||||
|
- Obsidian-LiveSync ([#16233](https://github.com/community-scripts/ProxmoxVE/pull/16233))
|
||||||
|
|
||||||
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- #### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- Actual Budget: allow native module install scripts under npm 11 (Node24) [@MickLesk](https://github.com/MickLesk) ([#16277](https://github.com/community-scripts/ProxmoxVE/pull/16277))
|
||||||
|
- Heimdall-Dashboard: run full composer install on update, force production env [@MickLesk](https://github.com/MickLesk) ([#16278](https://github.com/community-scripts/ProxmoxVE/pull/16278))
|
||||||
|
- xyOps: rebuild xySat satellite during update [@MickLesk](https://github.com/MickLesk) ([#16279](https://github.com/community-scripts/ProxmoxVE/pull/16279))
|
||||||
|
- HAOS: remove non-ASCII dash from CPU model dialog text [@MickLesk](https://github.com/MickLesk) ([#16276](https://github.com/community-scripts/ProxmoxVE/pull/16276))
|
||||||
|
- fix: back up Termix db/data so the update stops destroying encryption keys [@LukeGus](https://github.com/LukeGus) ([#16275](https://github.com/community-scripts/ProxmoxVE/pull/16275))
|
||||||
|
- passwordpusher: dynamically read Ruby version from .ruby-version file [@Copilot](https://github.com/Copilot) ([#16242](https://github.com/community-scripts/ProxmoxVE/pull/16242))
|
||||||
|
- fix(salt): write version cache to ~/.salt, not /~.salt [@TowyTowy](https://github.com/TowyTowy) ([#16265](https://github.com/community-scripts/ProxmoxVE/pull/16265))
|
||||||
|
- AFFiNE: fix version and build type reported by the app itself [@MickLesk](https://github.com/MickLesk) ([#16251](https://github.com/community-scripts/ProxmoxVE/pull/16251))
|
||||||
|
- Passbolt: fetch GPG key from Passbolt's own host instead of the flaky keyserver [@MickLesk](https://github.com/MickLesk) ([#16248](https://github.com/community-scripts/ProxmoxVE/pull/16248))
|
||||||
|
|
||||||
|
- #### ✨ New Features
|
||||||
|
|
||||||
|
- Opencloud: Pin version to 7.4.0 [@vhsdream](https://github.com/vhsdream) ([#16257](https://github.com/community-scripts/ProxmoxVE/pull/16257))
|
||||||
|
|
||||||
|
- #### 🔧 Refactor
|
||||||
|
|
||||||
|
- Bump NodeJS Versions of several scripts [@MickLesk](https://github.com/MickLesk) ([#16230](https://github.com/community-scripts/ProxmoxVE/pull/16230))
|
||||||
|
|
||||||
|
### 💾 Core
|
||||||
|
|
||||||
|
- #### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- tools.func: never delete ubuntu.sources (or other distro base sources) as orphaned [@MickLesk](https://github.com/MickLesk) ([#16250](https://github.com/community-scripts/ProxmoxVE/pull/16250))
|
||||||
|
- tools.func: complete a stale/partial backup manifest instead of trusting it as-is [@MickLesk](https://github.com/MickLesk) ([#16252](https://github.com/community-scripts/ProxmoxVE/pull/16252))
|
||||||
|
|
||||||
|
- #### 🔧 Refactor
|
||||||
|
|
||||||
|
- Refactor: harmonize tools/addon and move boilerplate into core.func [@MickLesk](https://github.com/MickLesk) ([#16202](https://github.com/community-scripts/ProxmoxVE/pull/16202))
|
||||||
|
|
||||||
|
## 2026-08-03
|
||||||
|
|
||||||
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- #### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- Correction to link in Paperless-NGX update script [@jsspen](https://github.com/jsspen) ([#16241](https://github.com/community-scripts/ProxmoxVE/pull/16241))
|
||||||
|
- fix restore env in split pro [@johanngrobe](https://github.com/johanngrobe) ([#16228](https://github.com/community-scripts/ProxmoxVE/pull/16228))
|
||||||
|
|
||||||
|
### 💾 Core
|
||||||
|
|
||||||
|
- #### 🔧 Refactor
|
||||||
|
|
||||||
|
- core: read all interactive prompts from /dev/tty, drain leftover input on read failure (hotfix) [@MickLesk](https://github.com/MickLesk) ([#16235](https://github.com/community-scripts/ProxmoxVE/pull/16235))
|
||||||
|
|
||||||
|
## 2026-08-02
|
||||||
|
|
||||||
|
### 🆕 New Scripts
|
||||||
|
|
||||||
|
- Portainer as Addon [@MickLesk](https://github.com/MickLesk) ([#16200](https://github.com/community-scripts/ProxmoxVE/pull/16200))
|
||||||
|
|
||||||
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- #### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- LibreNMS: Ensure ipmitool dependency is installed [@tremor021](https://github.com/tremor021) ([#16219](https://github.com/community-scripts/ProxmoxVE/pull/16219))
|
||||||
|
- Bitfocus Companion: add libatomic1 dependency [@tremor021](https://github.com/tremor021) ([#16212](https://github.com/community-scripts/ProxmoxVE/pull/16212))
|
||||||
|
- fix(dispatcharr): add recordings and dvr queues to celery worker [@eXistC](https://github.com/eXistC) ([#16204](https://github.com/community-scripts/ProxmoxVE/pull/16204))
|
||||||
|
- add retry for uv - same as immich [@asylumexp](https://github.com/asylumexp) ([#16203](https://github.com/community-scripts/ProxmoxVE/pull/16203))
|
||||||
|
- Fix for cross-seed node version regression [@TorinFrancis](https://github.com/TorinFrancis) ([#16209](https://github.com/community-scripts/ProxmoxVE/pull/16209))
|
||||||
|
|
||||||
|
- #### 🔧 Refactor
|
||||||
|
|
||||||
|
- chore: remove portainer setup from several scripts (moved to addon) [@MickLesk](https://github.com/MickLesk) ([#16201](https://github.com/community-scripts/ProxmoxVE/pull/16201))
|
||||||
|
|
||||||
## 2026-08-01
|
## 2026-08-01
|
||||||
|
|
||||||
### 🚀 Updated Scripts
|
### 🚀 Updated Scripts
|
||||||
|
|||||||
+7
-92
@@ -86,6 +86,9 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -99,7 +102,7 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
|||||||
|
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary><h4>August (1 entries)</h4></summary>
|
<summary><h4>August (8 entries)</h4></summary>
|
||||||
|
|
||||||
[View August 2026 Changelog](.github/changelogs/2026/08.md)
|
[View August 2026 Changelog](.github/changelogs/2026/08.md)
|
||||||
|
|
||||||
@@ -518,6 +521,8 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
## 2026-08-09
|
||||||
|
|
||||||
## 2026-08-08
|
## 2026-08-08
|
||||||
|
|
||||||
### 🆕 New Scripts
|
### 🆕 New Scripts
|
||||||
@@ -1166,94 +1171,4 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
|||||||
|
|
||||||
- Adapt to new artifact filename format for pocket id [@wollew](https://github.com/wollew) ([#15689](https://github.com/community-scripts/ProxmoxVE/pull/15689))
|
- Adapt to new artifact filename format for pocket id [@wollew](https://github.com/wollew) ([#15689](https://github.com/community-scripts/ProxmoxVE/pull/15689))
|
||||||
- Fireshare: Fix for install and upgrade to v1.7.3 [@tremor021](https://github.com/tremor021) ([#15673](https://github.com/community-scripts/ProxmoxVE/pull/15673))
|
- Fireshare: Fix for install and upgrade to v1.7.3 [@tremor021](https://github.com/tremor021) ([#15673](https://github.com/community-scripts/ProxmoxVE/pull/15673))
|
||||||
- Endurain: Fix update procedure [@tremor021](https://github.com/tremor021) ([#15674](https://github.com/community-scripts/ProxmoxVE/pull/15674))
|
- Endurain: Fix update procedure [@tremor021](https://github.com/tremor021) ([#15674](https://github.com/community-scripts/ProxmoxVE/pull/15674))
|
||||||
|
|
||||||
## 2026-07-09
|
|
||||||
|
|
||||||
### 🚀 Updated Scripts
|
|
||||||
|
|
||||||
- fix(pihole): repair Unbound DNS-over-TLS (DoT) forwarding config [@TowyTowy](https://github.com/TowyTowy) ([#15654](https://github.com/community-scripts/ProxmoxVE/pull/15654))
|
|
||||||
|
|
||||||
## 2026-07-08
|
|
||||||
|
|
||||||
### 🚀 Updated Scripts
|
|
||||||
|
|
||||||
- #### 🐞 Bug Fixes
|
|
||||||
|
|
||||||
- Opencloud: Bump version to 7.2.1 [@vhsdream](https://github.com/vhsdream) ([#15655](https://github.com/community-scripts/ProxmoxVE/pull/15655))
|
|
||||||
- BabyBuddy: Harden update script [@MickLesk](https://github.com/MickLesk) ([#15642](https://github.com/community-scripts/ProxmoxVE/pull/15642))
|
|
||||||
|
|
||||||
## 2026-07-07
|
|
||||||
|
|
||||||
### 🆕 New Scripts
|
|
||||||
|
|
||||||
- Forgejo-Runner ([#15046](https://github.com/community-scripts/ProxmoxVE/pull/15046))
|
|
||||||
|
|
||||||
## 2026-07-06
|
|
||||||
|
|
||||||
### 🚀 Updated Scripts
|
|
||||||
|
|
||||||
- Fix alignment in various ct end messages [@tremor021](https://github.com/tremor021) ([#15632](https://github.com/community-scripts/ProxmoxVE/pull/15632))
|
|
||||||
- Immich: Update libvips to 8.18.4 [@vhsdream](https://github.com/vhsdream) ([#15619](https://github.com/community-scripts/ProxmoxVE/pull/15619))
|
|
||||||
|
|
||||||
- #### 🐞 Bug Fixes
|
|
||||||
|
|
||||||
- Wizarr: Build JS and CSS static assets [@vhsdream](https://github.com/vhsdream) ([#15634](https://github.com/community-scripts/ProxmoxVE/pull/15634))
|
|
||||||
- RustDesk Server: Update URL format in rustdeskserver.sh [@tremor021](https://github.com/tremor021) ([#15626](https://github.com/community-scripts/ProxmoxVE/pull/15626))
|
|
||||||
- attempt to port docker-vm to support arm64 [@asylumexp](https://github.com/asylumexp) ([#15611](https://github.com/community-scripts/ProxmoxVE/pull/15611))
|
|
||||||
- fix(plane): don't clobber global app var, breaking /usr/bin/update [@asylumexp](https://github.com/asylumexp) ([#15612](https://github.com/community-scripts/ProxmoxVE/pull/15612))
|
|
||||||
|
|
||||||
- #### 🔧 Refactor
|
|
||||||
|
|
||||||
- cliproxyapi: point setup message at /management.html [@austinpilz](https://github.com/austinpilz) ([#15628](https://github.com/community-scripts/ProxmoxVE/pull/15628))
|
|
||||||
|
|
||||||
### 🗑️ Deleted Scripts
|
|
||||||
|
|
||||||
- Remove: FlowiseAI [@MickLesk](https://github.com/MickLesk) ([#15624](https://github.com/community-scripts/ProxmoxVE/pull/15624))
|
|
||||||
|
|
||||||
## 2026-07-05
|
|
||||||
|
|
||||||
### 🆕 New Scripts
|
|
||||||
|
|
||||||
- excalidash ([#15604](https://github.com/community-scripts/ProxmoxVE/pull/15604))
|
|
||||||
|
|
||||||
### 🚀 Updated Scripts
|
|
||||||
|
|
||||||
- #### 🐞 Bug Fixes
|
|
||||||
|
|
||||||
- fix: homarr: cli [@CrazyWolf13](https://github.com/CrazyWolf13) ([#15603](https://github.com/community-scripts/ProxmoxVE/pull/15603))
|
|
||||||
- immich: vacuum smart_search/face_search before VectorChord bump [@irishpadres](https://github.com/irishpadres) ([#15607](https://github.com/community-scripts/ProxmoxVE/pull/15607))
|
|
||||||
|
|
||||||
## 2026-07-04
|
|
||||||
|
|
||||||
### 🚀 Updated Scripts
|
|
||||||
|
|
||||||
- #### 🐞 Bug Fixes
|
|
||||||
|
|
||||||
- Element Synapse: Fix heredoc syntax in elementsynapse-install.sh [@tremor021](https://github.com/tremor021) ([#15594](https://github.com/community-scripts/ProxmoxVE/pull/15594))
|
|
||||||
- Twenty: Fix backup restore [@tremor021](https://github.com/tremor021) ([#15586](https://github.com/community-scripts/ProxmoxVE/pull/15586))
|
|
||||||
- fix(endurain): update frontend dist path after upstream restructure [@joaovitoriasilva](https://github.com/joaovitoriasilva) ([#15590](https://github.com/community-scripts/ProxmoxVE/pull/15590))
|
|
||||||
|
|
||||||
## 2026-07-03
|
|
||||||
|
|
||||||
### 🚀 Updated Scripts
|
|
||||||
|
|
||||||
- #### 🐞 Bug Fixes
|
|
||||||
|
|
||||||
- Immich: handle mise monorepo_root rename correctly | bump to 3.0.1 [@MickLesk](https://github.com/MickLesk) ([#15557](https://github.com/community-scripts/ProxmoxVE/pull/15557))
|
|
||||||
|
|
||||||
- #### ✨ New Features
|
|
||||||
|
|
||||||
- Opencloud: bump to v7.2.0 [@vhsdream](https://github.com/vhsdream) ([#15575](https://github.com/community-scripts/ProxmoxVE/pull/15575))
|
|
||||||
|
|
||||||
### 💾 Core
|
|
||||||
|
|
||||||
- #### 🔧 Refactor
|
|
||||||
|
|
||||||
- tools.func: fix corepack/pnpm install flow in setup_nodejs [@MickLesk](https://github.com/MickLesk) ([#15579](https://github.com/community-scripts/ProxmoxVE/pull/15579))
|
|
||||||
|
|
||||||
### 🧰 Tools
|
|
||||||
|
|
||||||
- #### 🐞 Bug Fixes
|
|
||||||
|
|
||||||
- Removed deprecated parameter in Filebrowser Quantum configuration [@alpargatagazer](https://github.com/alpargatagazer) ([#15573](https://github.com/community-scripts/ProxmoxVE/pull/15573))
|
|
||||||
+31
-178
@@ -27,10 +27,6 @@ APP_TYPE="addon"
|
|||||||
INSTALL_PATH="/opt/portainer"
|
INSTALL_PATH="/opt/portainer"
|
||||||
COMPOSE_FILE="${INSTALL_PATH}/compose.yaml"
|
COMPOSE_FILE="${INSTALL_PATH}/compose.yaml"
|
||||||
DEFAULT_PORT=9443
|
DEFAULT_PORT=9443
|
||||||
PORTAINER_IMAGE=""
|
|
||||||
COMPOSE_WORKDIR=""
|
|
||||||
COMPOSE_SERVICE=""
|
|
||||||
COMPOSE_CONFIG_FILES=""
|
|
||||||
|
|
||||||
# Initialize all core functions (colors, formatting, icons, STD mode)
|
# Initialize all core functions (colors, formatting, icons, STD mode)
|
||||||
load_functions
|
load_functions
|
||||||
@@ -69,167 +65,18 @@ UPDATEEOF
|
|||||||
msg_ok "Created update script (/usr/local/bin/update_portainer)"
|
msg_ok "Created update script (/usr/local/bin/update_portainer)"
|
||||||
}
|
}
|
||||||
|
|
||||||
# ==============================================================================
|
|
||||||
# DETECT EXISTING INSTALLATION
|
|
||||||
# ==============================================================================
|
|
||||||
function detect_portainer() {
|
|
||||||
PORTAINER_IMAGE=""
|
|
||||||
COMPOSE_WORKDIR=""
|
|
||||||
COMPOSE_SERVICE=""
|
|
||||||
COMPOSE_CONFIG_FILES=""
|
|
||||||
|
|
||||||
if ! docker container inspect portainer &>/dev/null; then
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
PORTAINER_IMAGE=$(docker inspect portainer --format '{{.Config.Image}}')
|
|
||||||
if [[ ! "$PORTAINER_IMAGE" =~ (^|/)portainer-(ce|ee)(:|@) ]]; then
|
|
||||||
msg_error "A container named 'portainer' exists but does not use an official Portainer CE or BE image."
|
|
||||||
exit 10
|
|
||||||
fi
|
|
||||||
|
|
||||||
COMPOSE_WORKDIR=$(docker inspect portainer --format '{{index .Config.Labels "com.docker.compose.project.working_dir"}}' 2>/dev/null || true)
|
|
||||||
COMPOSE_SERVICE=$(docker inspect portainer --format '{{index .Config.Labels "com.docker.compose.service"}}' 2>/dev/null || true)
|
|
||||||
COMPOSE_CONFIG_FILES=$(docker inspect portainer --format '{{index .Config.Labels "com.docker.compose.project.config_files"}}' 2>/dev/null || true)
|
|
||||||
if [[ "$COMPOSE_WORKDIR" == "<no value>" ]]; then
|
|
||||||
COMPOSE_WORKDIR=""
|
|
||||||
fi
|
|
||||||
if [[ "$COMPOSE_SERVICE" == "<no value>" ]]; then
|
|
||||||
COMPOSE_SERVICE=""
|
|
||||||
fi
|
|
||||||
if [[ "$COMPOSE_CONFIG_FILES" == "<no value>" ]]; then
|
|
||||||
COMPOSE_CONFIG_FILES=""
|
|
||||||
fi
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
# ==============================================================================
|
|
||||||
# UPDATE COMPOSE INSTALLATION
|
|
||||||
# ==============================================================================
|
|
||||||
function update_compose() {
|
|
||||||
local workdir="$1"
|
|
||||||
local service="$2"
|
|
||||||
local config_files="$3"
|
|
||||||
local config
|
|
||||||
local -a configs=()
|
|
||||||
local -a compose_args=()
|
|
||||||
|
|
||||||
if [[ -n "$config_files" ]]; then
|
|
||||||
IFS=',' read -ra configs <<<"$config_files"
|
|
||||||
for config in "${configs[@]}"; do
|
|
||||||
compose_args+=(--file "$config")
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
msg_info "Pulling latest ${APP} image"
|
|
||||||
if [[ -n "$service" ]]; then
|
|
||||||
(cd "$workdir" && $STD docker compose "${compose_args[@]}" pull "$service")
|
|
||||||
else
|
|
||||||
(cd "$workdir" && $STD docker compose pull)
|
|
||||||
fi
|
|
||||||
msg_ok "Pulled latest image"
|
|
||||||
|
|
||||||
msg_info "Restarting ${APP}"
|
|
||||||
if [[ -n "$service" ]]; then
|
|
||||||
(cd "$workdir" && $STD docker compose "${compose_args[@]}" up -d "$service")
|
|
||||||
else
|
|
||||||
(cd "$workdir" && $STD docker compose up -d --remove-orphans)
|
|
||||||
fi
|
|
||||||
msg_ok "Restarted ${APP}"
|
|
||||||
}
|
|
||||||
|
|
||||||
# ==============================================================================
|
|
||||||
# UPDATE STANDALONE INSTALLATION
|
|
||||||
# ==============================================================================
|
|
||||||
function update_standalone() {
|
|
||||||
local old_image_id latest_image_id restart_name restart_max network_mode container_port host_ip host_port source destination mode writable
|
|
||||||
local was_running privileged user
|
|
||||||
local -a run_args=(-d --name portainer)
|
|
||||||
local -a command=()
|
|
||||||
|
|
||||||
old_image_id=$(docker inspect portainer --format '{{.Image}}')
|
|
||||||
was_running=$(docker inspect portainer --format '{{.State.Running}}')
|
|
||||||
restart_name=$(docker inspect portainer --format '{{.HostConfig.RestartPolicy.Name}}')
|
|
||||||
restart_max=$(docker inspect portainer --format '{{.HostConfig.RestartPolicy.MaximumRetryCount}}')
|
|
||||||
network_mode=$(docker inspect portainer --format '{{.HostConfig.NetworkMode}}')
|
|
||||||
privileged=$(docker inspect portainer --format '{{.HostConfig.Privileged}}')
|
|
||||||
user=$(docker inspect portainer --format '{{.Config.User}}')
|
|
||||||
|
|
||||||
if [[ -n "$restart_name" && "$restart_name" != "no" ]]; then
|
|
||||||
if [[ "$restart_name" == "on-failure" && "$restart_max" -gt 0 ]]; then
|
|
||||||
run_args+=(--restart "${restart_name}:${restart_max}")
|
|
||||||
else
|
|
||||||
run_args+=(--restart "$restart_name")
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
[[ "$network_mode" != "default" ]] && run_args+=(--network "$network_mode")
|
|
||||||
[[ "$privileged" == "true" ]] && run_args+=(--privileged)
|
|
||||||
[[ -n "$user" ]] && run_args+=(--user "$user")
|
|
||||||
|
|
||||||
while IFS='|' read -r container_port host_ip host_port; do
|
|
||||||
[[ -z "$container_port" || -z "$host_port" ]] && continue
|
|
||||||
[[ "$host_ip" == *:* ]] && host_ip="[${host_ip}]"
|
|
||||||
if [[ -n "$host_ip" && "$host_ip" != "0.0.0.0" ]]; then
|
|
||||||
run_args+=(-p "${host_ip}:${host_port}:${container_port}")
|
|
||||||
else
|
|
||||||
run_args+=(-p "${host_port}:${container_port}")
|
|
||||||
fi
|
|
||||||
done < <(docker inspect portainer --format '{{range $port, $bindings := .HostConfig.PortBindings}}{{range $bindings}}{{printf "%s|%s|%s\n" $port .HostIp .HostPort}}{{end}}{{end}}')
|
|
||||||
|
|
||||||
while IFS='|' read -r source destination mode writable; do
|
|
||||||
[[ -z "$source" || -z "$destination" ]] && continue
|
|
||||||
if [[ "$writable" == "false" ]]; then
|
|
||||||
mode="${mode:+${mode},}ro"
|
|
||||||
fi
|
|
||||||
run_args+=(-v "${source}:${destination}${mode:+:${mode}}")
|
|
||||||
done < <(docker inspect portainer --format '{{range .Mounts}}{{if eq .Type "volume"}}{{.Name}}{{else}}{{.Source}}{{end}}|{{.Destination}}|{{.Mode}}|{{.RW}}{{println}}{{end}}')
|
|
||||||
|
|
||||||
while IFS= read -r environment; do
|
|
||||||
[[ -n "$environment" ]] && run_args+=(-e "$environment")
|
|
||||||
done < <(docker inspect portainer --format '{{range .Config.Env}}{{println .}}{{end}}')
|
|
||||||
|
|
||||||
while IFS= read -r argument; do
|
|
||||||
[[ -n "$argument" ]] && command+=("$argument")
|
|
||||||
done < <(docker inspect portainer --format '{{range .Config.Cmd}}{{println .}}{{end}}')
|
|
||||||
|
|
||||||
msg_info "Pulling latest ${APP} image"
|
|
||||||
$STD docker pull "$PORTAINER_IMAGE"
|
|
||||||
latest_image_id=$(docker image inspect "$PORTAINER_IMAGE" --format '{{.Id}}')
|
|
||||||
msg_ok "Pulled latest image"
|
|
||||||
|
|
||||||
if [[ "$old_image_id" == "$latest_image_id" ]]; then
|
|
||||||
msg_ok "${APP} is already up to date"
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
msg_info "Recreating ${APP}"
|
|
||||||
[[ "$was_running" == "true" ]] && $STD docker stop portainer
|
|
||||||
$STD docker rm portainer
|
|
||||||
if ! $STD docker run "${run_args[@]}" "$PORTAINER_IMAGE" "${command[@]}"; then
|
|
||||||
msg_warn "Update failed, restoring the previous ${APP} image"
|
|
||||||
docker rm -f portainer &>/dev/null || true
|
|
||||||
if $STD docker run "${run_args[@]}" "$old_image_id" "${command[@]}"; then
|
|
||||||
[[ "$was_running" != "true" ]] && $STD docker stop portainer
|
|
||||||
msg_error "Failed to update ${APP}; restored the previous container."
|
|
||||||
else
|
|
||||||
msg_error "Failed to update or restore ${APP}."
|
|
||||||
fi
|
|
||||||
exit 10
|
|
||||||
fi
|
|
||||||
msg_ok "Recreated ${APP}"
|
|
||||||
}
|
|
||||||
|
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
# UPDATE
|
# UPDATE
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
function update() {
|
function update() {
|
||||||
if [[ -f "$COMPOSE_FILE" ]]; then
|
msg_info "Pulling latest ${APP} image"
|
||||||
update_compose "$INSTALL_PATH" "" ""
|
cd "$INSTALL_PATH"
|
||||||
elif [[ -n "$COMPOSE_WORKDIR" && -n "$COMPOSE_SERVICE" && -d "$COMPOSE_WORKDIR" ]]; then
|
$STD docker compose pull
|
||||||
update_compose "$COMPOSE_WORKDIR" "$COMPOSE_SERVICE" "$COMPOSE_CONFIG_FILES"
|
msg_ok "Pulled latest image"
|
||||||
else
|
|
||||||
update_standalone
|
msg_info "Restarting ${APP}"
|
||||||
fi
|
$STD docker compose up -d --remove-orphans
|
||||||
|
msg_ok "Restarted ${APP}"
|
||||||
|
|
||||||
ensure_update_script
|
ensure_update_script
|
||||||
|
|
||||||
@@ -252,16 +99,26 @@ function check_docker() {
|
|||||||
msg_ok "Docker $(docker --version | cut -d' ' -f3 | tr -d ',') and Docker Compose are available"
|
msg_ok "Docker $(docker --version | cut -d' ' -f3 | tr -d ',') and Docker Compose are available"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# CHECK EXISTING CONTAINER
|
||||||
|
# ==============================================================================
|
||||||
|
function check_existing_container() {
|
||||||
|
# Guards against clobbering a Portainer container not managed by this addon
|
||||||
|
# (e.g. Business/Enterprise Edition installed manually or via the legacy docker.sh flow)
|
||||||
|
if docker ps -a --format '{{.Names}}' | grep -q '^portainer$'; then
|
||||||
|
msg_error "A container named 'portainer' already exists but is not managed by this addon."
|
||||||
|
msg_error "This may be a Portainer Business/Enterprise Edition install or a manual setup."
|
||||||
|
msg_error "Remove/rename that container first, or manage it manually. Exiting."
|
||||||
|
exit 10
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
# INSTALL
|
# INSTALL
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
function install() {
|
function install() {
|
||||||
check_docker
|
check_docker
|
||||||
detect_portainer
|
check_existing_container
|
||||||
if [[ -n "$PORTAINER_IMAGE" ]]; then
|
|
||||||
msg_error "${APP} is already installed."
|
|
||||||
exit 10
|
|
||||||
fi
|
|
||||||
|
|
||||||
msg_info "Creating install directory"
|
msg_info "Creating install directory"
|
||||||
mkdir -p "$INSTALL_PATH"
|
mkdir -p "$INSTALL_PATH"
|
||||||
@@ -291,9 +148,7 @@ function install() {
|
|||||||
# Handle type=update (called from update script)
|
# Handle type=update (called from update script)
|
||||||
if [[ "${type:-}" == "update" ]]; then
|
if [[ "${type:-}" == "update" ]]; then
|
||||||
header_info
|
header_info
|
||||||
check_docker
|
if [[ -f "$COMPOSE_FILE" ]]; then
|
||||||
detect_portainer
|
|
||||||
if [[ -f "$COMPOSE_FILE" || -n "$PORTAINER_IMAGE" ]]; then
|
|
||||||
update
|
update
|
||||||
else
|
else
|
||||||
msg_error "${APP} is not installed. Nothing to update."
|
msg_error "${APP} is not installed. Nothing to update."
|
||||||
@@ -306,20 +161,18 @@ header_info
|
|||||||
get_lxc_ip
|
get_lxc_ip
|
||||||
|
|
||||||
check_docker
|
check_docker
|
||||||
detect_portainer
|
check_existing_container
|
||||||
|
|
||||||
# Check if already installed
|
# Check if already installed
|
||||||
if [[ -f "$COMPOSE_FILE" || -n "$PORTAINER_IMAGE" ]]; then
|
if [[ -f "$COMPOSE_FILE" ]]; then
|
||||||
msg_warn "${APP} is already installed."
|
msg_warn "${APP} is already installed."
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
if [[ -f "$COMPOSE_FILE" ]]; then
|
echo -n "${TAB}Uninstall ${APP}? (y/N): "
|
||||||
echo -n "${TAB}Uninstall ${APP}? (y/N): "
|
read -r uninstall_prompt
|
||||||
read -r uninstall_prompt
|
if [[ "${uninstall_prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||||
if [[ "${uninstall_prompt,,}" =~ ^(y|yes)$ ]]; then
|
uninstall
|
||||||
uninstall
|
exit 0
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -n "${TAB}Update ${APP}? (y/N): "
|
echo -n "${TAB}Update ${APP}? (y/N): "
|
||||||
|
|||||||
Reference in New Issue
Block a user