feat(openclaw): enhance example with configuration options#413
feat(openclaw): enhance example with configuration options#413Jah-yee wants to merge 2 commits intoalibaba:mainfrom
Conversation
… defaults - Add environment variable support for server, image, timeout, token, port - Expand network policy to allow GitHub API access - Improve README with configuration tables and advanced usage - Add custom gateway port documentation - Add token truncation in log output for security
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
OpenClaw Bot seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
- Change network_mode from Literal['host', 'bridge'] to str to allow user-defined network names - Remove startup-time validation that blocked custom networks - Update port-mapping logic to handle any non-host network mode - Update endpoint resolution to work with user-defined networks This enables OpenSandbox to work in Docker Compose setups with shared user-defined networks (e.g., app-net), allowing sandbox containers to communicate with other services like databases by hostname.
|
Thanks for your submission. Please sign the CLA and you should revert the changes related to server docker network support in this PR, as there is a more complete implementation in #426 . This commit should only focus on the openclaw example. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6a9350ed79
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| network_mode: str = Field( | ||
| default="host", | ||
| description="Docker network mode for sandbox containers (host, bridge, ...).", | ||
| description="Docker network mode for sandbox containers (host, bridge, or user-defined network name).", |
There was a problem hiding this comment.
Preserve case for user-defined Docker network names
By widening docker.network_mode to str here, configs can now carry user-defined network names, but DockerSandboxService.__init__ still applies .lower() before passing that value to Docker (server/src/services/docker.py, init path). That mutates the configured network identifier and can make sandbox startup fail against mixed-case custom networks (network not found), so the new custom-network support is not reliable. Normalize only known literals (host/bridge) and keep user-provided network names unchanged.
Useful? React with 👍 / 👎.
Summary
Enhance the OpenClaw example with better configuration options and documentation:
Changes
OPENCLAW_SERVER,OPENCLAW_IMAGE,OPENCLAW_TIMEOUT,OPENCLAW_TOKEN,OPENCLAW_PORTUsage
Testing
Related