fix(docker): add --home CLI flag and Docker deployment docs#1521
Open
SonicBotMan wants to merge 1 commit intoMemTensor:mainfrom
Open
fix(docker): add --home CLI flag and Docker deployment docs#1521SonicBotMan wants to merge 1 commit intoMemTensor:mainfrom
SonicBotMan wants to merge 1 commit intoMemTensor:mainfrom
Conversation
When MemTensor runs inside a Docker container and the daemon is started directly from the container's entrypoint.sh (not through the Python adapter's bridge_client.py), the bridge cannot locate its config.yaml. This adds: - --home=<path> CLI flag to bridge.cts that sets MEMOS_HOME before bootstrap, making Docker entrypoint configuration straightforward - docs/DOCKER.md with full Docker deployment guide, troubleshooting, and config discovery explanation - Configuration Discovery section in README.md documenting the priority order (CLI flag > env var > default) - Docker startup example in adapters/hermes/README.md Fixes MemTensor#1520
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #1520
When MemTensor runs inside a Docker container and the daemon is started directly from the container's
entrypoint.sh(not through the Python adapter'sbridge_client.py), the bridge cannot locate itsconfig.yaml, resulting in missing embedding/LLM providers and wrong data directory.Changes
1.
bridge.cts—--homeCLI flagAdds a
--home=<path>CLI argument that setsMEMOS_HOMEbefore the config is loaded viaresolveHome(). This is the simplest way to configure the bridge in Docker:Also updated the file's header comment to document all CLI flags and env vars.
2.
docs/DOCKER.md— Docker Deployment GuideNew document covering:
--homeflag,MEMOS_HOMEenv var,MEMOS_CONFIG_FILEenv var)3.
README.md— Configuration Discovery sectionAdded a "Configuration Discovery" section documenting the 4-level priority for config resolution, with a link to the Docker guide.
4.
adapters/hermes/README.md— Docker startup exampleAdded a "Docker / Manual Daemon Startup" subsection showing the
--homeflag usage.Testing
bridge.ctschanges are additive (new CLI arg + env var injection before bootstrap)MEMOS_HOMEis already set or the default path works--homeflag resolves to an absolute path before being passed toprocess.env, consistent withresolveHome()behaviorHow Docker users should use this
Before (broken — daemon can't find config):
After (working):