release 1.2.4: fix unescaped backticks in the compose render heredoc
release gate / check (push) Failing after 6m28s
release / smoke (push) Successful in 10m31s
release / publish (push) Failing after 9m57s

The unquoted heredoc in render_superbrain_compose turned the comment's
backticked 'docker container inspect superbrain' into command substitution;
re-rendering while the stack runs injected inspect JSON into the compose
file and update.sh's parse guard aborted (2026-11-05, core). Reworded;
1.2.3's /deploy remains defective for updates, use 1.2.4+.
This commit is contained in:
Andrew S Erwin
2026-11-05 14:16:53 -06:00
parent aefc84441c
commit 3816155b91
5 changed files with 18 additions and 6 deletions
+9
View File
@@ -363,6 +363,15 @@ the Gitea repo secrets `DOCKERHUB_USERNAME`/`DOCKERHUB_TOKEN` are still unset
(andrew's account gets 403 on the repo secrets API; an org owner must set
them) — until then every release needs a manual Option B push.
**1.2.3 is defective for updates — use 1.2.4+:** its migrate image's
`/deploy/lib-superbrain.sh` carries unescaped backticks inside the unquoted
`render_superbrain_compose` heredoc (command substitution). A re-render while
the stack is running injects `docker container inspect` JSON into the compose
file; update.sh's parse guard aborts (safely, leaving the old compose
replaced by the broken render — restore by re-rendering from a fixed lib).
Fixed in 1.2.4 by rewording; rule: no backticks or unescaped `$` inside that
heredoc, ever.
### Not applicable
- `email_superbrain`: since the notification engine (2026-10-26) the app
+6 -3
View File
@@ -48,7 +48,7 @@ SUPERBRAIN_APP_IP="192.168.0.94"
SUPERBRAIN_MIGRATE_IP="192.168.0.95"
# Release to install; the generic `upgrade` flow keeps .env in step with the
# service file's VERSION afterwards.
SUPERBRAIN_IMAGE_VERSION="1.2.3"
SUPERBRAIN_IMAGE_VERSION="1.2.4"
# render_superbrain_compose writes the app-dir compose file. Called by
# config_superbrain (install) and by deploy/federated/update.sh after a lib
@@ -84,8 +84,11 @@ services:
web:
image: federatedcomputer/superbrain-web:\${IMAGE_VERSION}
# MUST be named exactly "superbrain": upgrade_app() probes
# `docker container inspect superbrain` and skips apps whose primary
# container it cannot find under the app name.
# "docker container inspect superbrain" and skips apps whose primary
# container it cannot find under the app name. (No backticks in this
# heredoc: it is unquoted, so they would become command substitution —
# hit in production 2026-11-05 when a re-render with the container
# running injected inspect JSON into the compose file.)
container_name: superbrain
hostname: superbrain.$DOMAIN
restart: always
+1 -1
View File
@@ -2,7 +2,7 @@ NAME=superbrain
DESCRIPTION="Bookmark & Knowledge Base"
DOCS=https://github.com/andrew/superbrain
CONTAINER=federatedcomputer/superbrain-app
VERSION=1.2.3
VERSION=1.2.4
INTERNAL_IP=192.168.0.93
DEPENDS="postgresql"
PORTS=3000