From 00f1cadbdf6efb18cb1e79702f7869c4265fd0a9 Mon Sep 17 00:00:00 2001 From: Jiri Date: Fri, 28 Nov 2025 16:31:46 +0100 Subject: [PATCH 1/3] Compose expose fixes --- docker-compose.yml | 8 ++++++-- entrypoints/run-localnet-setup.py | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 5de9433f..146d2c83 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -36,7 +36,12 @@ services: volumes: - "setup-data:/setup" - "node0-data:/root/.fetchd" - + ports: + - "26657:26657" + - "26656:26656" + - "1317:1317" + - "9090:9090" + # networks: # localnet: # ipv4_address: 192.168.10.2 @@ -57,7 +62,6 @@ services: volumes: - "setup-data:/setup" - "node1-data:/root/.fetchd" - # networks: # localnet: # ipv4_address: 192.168.10.3 diff --git a/entrypoints/run-localnet-setup.py b/entrypoints/run-localnet-setup.py index d0c389a7..08af52ee 100755 --- a/entrypoints/run-localnet-setup.py +++ b/entrypoints/run-localnet-setup.py @@ -11,13 +11,15 @@ FETCHD_CONFIG_ROOT = '/root/.fetchd/config' GENESIS_PATH = os.path.join(FETCHD_CONFIG_ROOT, 'genesis.json') GENTX_PATH = os.path.join(FETCHD_CONFIG_ROOT, 'gentx') - +APP_TOML_PATH = os.path.join(FETCHD_CONFIG_ROOT, "app.toml") def create_genesis(chain_id: str): cmd = ['fetchd', 'init', 'setup-node', '--chain-id', chain_id] subprocess.check_call(cmd) replace_denom_cmd = ['sed', '-i', 's/stake/'+DENOM+'/g', GENESIS_PATH] subprocess.check_call(replace_denom_cmd) + grpc_fix_cmd = ['sed','-i','s/address = "localhost/address = "0.0.0.0/', APP_TOML_PATH] + subprocess.check_call(grpc_fix_cmd) def get_validators(): validators = set() From 956cff2a663892023896711ee6fef0d8763ad022 Mon Sep 17 00:00:00 2001 From: Jiri Date: Fri, 28 Nov 2025 19:37:07 +0100 Subject: [PATCH 2/3] Improvements --- entrypoints/run-localnet-setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoints/run-localnet-setup.py b/entrypoints/run-localnet-setup.py index 08af52ee..a1f1cf4f 100755 --- a/entrypoints/run-localnet-setup.py +++ b/entrypoints/run-localnet-setup.py @@ -18,7 +18,7 @@ def create_genesis(chain_id: str): subprocess.check_call(cmd) replace_denom_cmd = ['sed', '-i', 's/stake/'+DENOM+'/g', GENESIS_PATH] subprocess.check_call(replace_denom_cmd) - grpc_fix_cmd = ['sed','-i','s/address = "localhost/address = "0.0.0.0/', APP_TOML_PATH] + grpc_fix_cmd = ['sed','-i','s/localhost/0.0.0.0/', APP_TOML_PATH] subprocess.check_call(grpc_fix_cmd) def get_validators(): From 7799cde8d6ed882996bb06fd8b15bccf7181dab2 Mon Sep 17 00:00:00 2001 From: Jiri Date: Fri, 28 Nov 2025 20:29:07 +0100 Subject: [PATCH 3/3] Fix --- entrypoints/run-localnet-setup.py | 2 +- entrypoints/run-localnet.sh | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/entrypoints/run-localnet-setup.py b/entrypoints/run-localnet-setup.py index a1f1cf4f..44ca7535 100755 --- a/entrypoints/run-localnet-setup.py +++ b/entrypoints/run-localnet-setup.py @@ -11,7 +11,7 @@ FETCHD_CONFIG_ROOT = '/root/.fetchd/config' GENESIS_PATH = os.path.join(FETCHD_CONFIG_ROOT, 'genesis.json') GENTX_PATH = os.path.join(FETCHD_CONFIG_ROOT, 'gentx') -APP_TOML_PATH = os.path.join(FETCHD_CONFIG_ROOT, "app.toml") +APP_TOML_PATH = os.path.join(FETCHD_CONFIG_ROOT, 'app.toml') def create_genesis(chain_id: str): cmd = ['fetchd', 'init', 'setup-node', '--chain-id', chain_id] diff --git a/entrypoints/run-localnet.sh b/entrypoints/run-localnet.sh index 6c145f19..981aeec4 100755 --- a/entrypoints/run-localnet.sh +++ b/entrypoints/run-localnet.sh @@ -67,6 +67,11 @@ if [ ! -f /setup/genesis.json ]; then done fi +# ensure gRPC listens on 0.0.0.0, not localhost +if [ -f "/root/.fetchd/config/app.toml" ]; then + sed -i 's/localhost/0.0.0.0/g' /root/.fetchd/config/app.toml +fi + # copy the generated genesis file cp /setup/genesis.json /root/.fetchd/config/genesis.json