-
Notifications
You must be signed in to change notification settings - Fork 11.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CLI] Make service hosts configurable in
sui start
(#18607)
## Description Make indexer, GraphQL, faucet hosts configurable. When using Docker, due to the way it sets up a network interface for the container, the services need to bind to 0.0.0.0 to be able to be accessed from outside the container. This PR enables configurable hosts for these three services via optional flags: - `--indexer-host 0.0.0.0` - `--faucet-host 0.0.0.0` - `--graphql-host 0.0.0.0` If no host flag is provided, it will use the default `0.0.0.0` one. In addition, I found a bug where if the `default_value` is not provided, calling `unwrap_or_default` will return value 0 (if that field is an int). For example, if we call `--with-graphql`, the indexer port would have been set to 0 because the `default_missing_value` is only set when the flag is passed, but not when it is not passed, which is the case here due `with-indexer` being implicit enabled. This supersedes #14701 and should close #14701. ## Test plan How did you test the new or updated feature? --- ## Release notes Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required. For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates. - [ ] Protocol: - [ ] Nodes (Validators and Full nodes): - [ ] Indexer: - [ ] JSON-RPC: - [ ] GraphQL: - [x] CLI: Changed `sui start` to allow configurable hosts for indexer (`--indexer-host `), GraphQL (`--graphql-host `), and faucet (`--faucet-host`) services. This will enable to use `sui start` from a Docker container. By default, all services start with `0.0.0.0` host. - [ ] Rust SDK:
- Loading branch information
1 parent
3c9b596
commit 6b425c9
Showing
2 changed files
with
107 additions
and
37 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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