Skip to content

Commit

Permalink
Adding node internal ip
Browse files Browse the repository at this point in the history
  • Loading branch information
b-gopalswami committed Dec 11, 2024
1 parent d688ed8 commit 1188703
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions framework/components/clnode/clnode.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ type NodeOut struct {
HostURL string `toml:"url"`
DockerURL string `toml:"docker_internal_url"`
DockerP2PUrl string `toml:"p2p_docker_internal_url"`
InternalIP string `toml:"internal_ip"`
}

// NewNodeWithDB create a new Chainlink node with some image:tag and one or several configs
Expand Down Expand Up @@ -298,6 +299,11 @@ func newNode(in *Input, pgOut *postgres.Output) (*NodeOut, error) {
ContainerRequest: req,
Started: true,
})
ip, err := c.ContainerIP(ctx)
if err != nil {
return nil, err
}

if err != nil {
return nil, err
}
Expand All @@ -315,6 +321,7 @@ func newNode(in *Input, pgOut *postgres.Output) (*NodeOut, error) {
HostURL: fmt.Sprintf("http://%s:%s", host, mp.Port()),
DockerURL: fmt.Sprintf("http://%s:%s", containerName, DefaultHTTPPort),
DockerP2PUrl: fmt.Sprintf("http://%s:%s", containerName, DefaultP2PPort),
InternalIP: ip,
}, nil
}

Expand Down

0 comments on commit 1188703

Please sign in to comment.