diff --git a/scripts/instance/instance_create.sh b/scripts/instance/instance_create.sh index cb6c463..dbbe5c8 100644 --- a/scripts/instance/instance_create.sh +++ b/scripts/instance/instance_create.sh @@ -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__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"