fix(docker): preserve explicit config selectors during bootstrap
Only initialize the Compose default instance when no --config/-c selector is present. Preserve all CLI-supported selector spellings and cover gateway/API startup against selected persisted settings in the Docker smoke test.
This commit is contained in:
1 parent
b079522fa1
commit
103840171b
3 files changed
+62
-4
No files matched your search
+12
-3
@@ -43,9 +43,18 @@ if [ "$RENDER" = "true" ]; then
|
||||
fi
|
||||
set -- "$@" --config "$config"
|
||||
elif [ "$NANOBOT_DOCKER_BOOTSTRAP" = "1" ] && { [ "$1" = "gateway" ] || [ "$1" = "serve" ]; }; then
|
||||
config="$dir/config.json"
|
||||
python -m nanobot.cli.docker_bootstrap "$config" || exit 1
|
||||
set -- "$@" --config "$config"
|
||||
# Explicit config selectors belong to the CLI; bootstrap only the default instance.
|
||||
initialize_default=1
|
||||
for argument in "$@"; do
|
||||
case "$argument" in
|
||||
--config|--config=*|-c*) initialize_default=0; break ;;
|
||||
esac
|
||||
done
|
||||
if [ "$initialize_default" = "1" ]; then
|
||||
config="$dir/config.json"
|
||||
python -m nanobot.cli.docker_bootstrap "$config" || exit 1
|
||||
set -- "$@" --config "$config"
|
||||
fi
|
||||
fi
|
||||
|
||||
exec nanobot "$@"
|
||||
Reference in new issue
Block a user