From a1eae10112af01b9c35130fa69d149427a83a365 Mon Sep 17 00:00:00 2001 From: andrew Date: Wed, 4 Nov 2026 15:39:12 +0000 Subject: [PATCH] Register superbrain in EXTRA_APPS; fail upgrade_app when the app does not come back up The 2026-11-03 upgrade-federated.timer run stopped superbrain, then /federated/bin/start superbrain fell through to usage/exit 2 because superbrain was absent from SERVICES (CORE_APPS/EXTRA_APPS); upgrade_app ignored the exit status and printed Done upgrading over a dead stack, which left traefik answering its default 404 for the whole hostname. - add superbrain to EXTRA_APPS so bin/start can dispatch it - upgrade_app: after the post-redeploy start, check the exit status AND that the primary container is actually running; otherwise send_matrix_alert and return 1 instead of reporting success --- lib/functions.sh | 7 ++++++- services/superbrain/service | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/functions.sh b/lib/functions.sh index c00c444..9bd2fba 100644 --- a/lib/functions.sh +++ b/lib/functions.sh @@ -31,7 +31,7 @@ # Define all services CORE_APPS=("pdnsmysql" "pdns" "pdnsadmin" "traefik" "postgresql" "ldap" "mail" "authelia") -EXTRA_APPS=("collabora" "nextcloud" "matrix" "element" "listmonk" "vaultwarden" "panel" "wireguard" "jitsi" "baserow" "gitea" "caddy" "autodiscover" "castopod" "wordpress" "coturn" "bookstack" "freescout" "msp" "espocrm" "nginx" "matrixslack" "matrixsignal" "matrixwhatsapp" "dashboard" "jitsiopenid" "roundcube" "redis" "discourse" "wordpressshop" "plane" "calcom" "headscale" "headplane" "dittofeed" "kimai" "nodeexporter" "tailscale" "gitearunner" "nextcloudtalk" "clickhouseserver" "plausible" "docuseal" "mautic" "matomo" "superpanel" "n8n" "immich" "mcpserver" "erpnext" "hermes") +EXTRA_APPS=("collabora" "nextcloud" "matrix" "element" "listmonk" "vaultwarden" "panel" "wireguard" "jitsi" "baserow" "gitea" "caddy" "autodiscover" "castopod" "wordpress" "coturn" "bookstack" "freescout" "msp" "espocrm" "nginx" "matrixslack" "matrixsignal" "matrixwhatsapp" "dashboard" "jitsiopenid" "roundcube" "redis" "discourse" "wordpressshop" "plane" "calcom" "headscale" "headplane" "dittofeed" "kimai" "nodeexporter" "tailscale" "gitearunner" "nextcloudtalk" "clickhouseserver" "plausible" "docuseal" "mautic" "matomo" "superpanel" "n8n" "immich" "mcpserver" "erpnext" "hermes" "superbrain") SERVICES=("${CORE_APPS[@]}" "${EXTRA_APPS[@]}") failts() { @@ -345,6 +345,11 @@ upgrade_app() { echo -ne "$APP was already shut down so we won't be starting it.\n" else /federated/bin/start $APP + if [ $? -ne 0 ] && [ "$(docker container inspect -f '{{.State.Running}}' $APP 2>/dev/null)" != "true" ]; then + send_matrix_alert "$DOMAIN ($EXTERNALIP): upgrade of $APP to $VERSION finished but the app did not come back up - investigate now, the service is likely DOWN" + echo -ne "ERROR: start $APP failed during upgrade - app may be DOWN, not reporting success.\n" + return 1 + fi if [ -x "/federated/services/${APP}/upgrade/post" ]; then if ! /federated/services/${APP}/upgrade/post ${IMAGE_VERSION} ${VERSION}; then echo "Post-upgrade script for ${APP} failed, verify the app still works" diff --git a/services/superbrain/service b/services/superbrain/service index 7ad6015..a6e9b31 100644 --- a/services/superbrain/service +++ b/services/superbrain/service @@ -2,7 +2,7 @@ NAME=Superbrain DESCRIPTION="Bookmark & Knowledge Base" DOCS=https://github.com/andrew/superbrain CONTAINER=federatedcomputer/superbrain-app -VERSION=1.0.1 +VERSION=1.2.0 INTERNAL_IP=192.168.0.93 DEPENDS="postgresql" PORTS=3000 -- 2.53.0