Point an instance's APP_NAME at its own slug
instanceCreate re-namespaced the config KEYS (CFG_<TYPE>_* -> CFG_<SLUG>_*) but left APP_NAME's VALUE at the type. installApp resolves the app it operates on from CFG_<SLUG>_APP_NAME, so `instance create bookstack fwtest` ran the entire install pipeline against the BASE app: "Install bookstack", the base deployed dir, compose down/up on the already-running base container, base DB row re-stamped — and the instance never installed at all. Only the template dir was left behind. Every base app ships APP_NAME == its own slug; stamp instances the same. Instance install still does not complete after this: the cloned compose keeps the type's tag namespace (#LIBREPORTAL|BOOKSTACK_APP_KEY_1_TAG|...) while the config now defines CFG_<SLUG>_*, so the placeholders never substitute and the pre-start guard refuses to launch. Fixing that is a separate change to _instanceRewriteCompose. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
861a51a22c
commit
9d6fd25c41
@ -182,6 +182,14 @@ instanceCreate() {
|
||||
type_title=$(instanceTypeCfg "$type" "TITLE")
|
||||
[[ -z "$type_title" ]] && type_title="$type"
|
||||
|
||||
# APP_NAME must follow the slug. The sed above re-namespaces the KEY but
|
||||
# leaves the VALUE at the type ("bookstack"), and installApp resolves the app
|
||||
# it operates on from CFG_<SLUG>_APP_NAME — so an instance install ran the
|
||||
# whole pipeline against the BASE app instead: same deployed dir, same ports,
|
||||
# compose down/up on the already-running base container, base DB row updated,
|
||||
# and the instance itself never installed. Every base app ships APP_NAME ==
|
||||
# its own slug; this keeps instances to that invariant.
|
||||
_instanceSetCfg "CFG_${slug_u}_APP_NAME" "$slug" "$cfg"
|
||||
_instanceSetCfg "CFG_${slug_u}_INSTANCE_OF" "$type" "$cfg"
|
||||
_instanceSetCfg "CFG_${slug_u}_MULTI_INSTANCE" "false" "$cfg"
|
||||
_instanceSetCfg "CFG_${slug_u}_TITLE" "${type_title} · ${id}" "$cfg"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user