Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose bitcoind RPC API to the host machine #3

Closed
LaurentMT opened this issue Jun 4, 2019 · 4 comments
Closed

Expose bitcoind RPC API to the host machine #3

LaurentMT opened this issue Jun 4, 2019 · 4 comments
Labels
enhancement New feature or request my-dojo Something related to my-dojo

Comments

@LaurentMT
Copy link
Contributor

It seems that some users are willing to use the bitcoind packaged in docker as a source for external apps running on the docker host (e.g;: LN node, etc).

May be we could expose the port of the RPC API to the localhost, with something like

bitcoind:
  ports:
    - "127.0.0.1:28256:28256"
@kenshin-samourai kenshin-samourai added enhancement New feature or request my-dojo Something related to my-dojo labels Jun 5, 2019
@kenshin-samourai
Copy link
Contributor

a couple of remarks

  • localhost isn't going to work when containers run in a vm (mac os, windows)
  • make it optional? (default = no port exposed)

@kenshin-samourai
Copy link
Contributor

Implemented in PR #8 as an option

Setup in /my-dojo/conf/docker-bitcoind.conf

  • BITCOIND_RPC_EXTERNAL allows to expose/hide the rpc api outside of docker (default = hidden)
  • BITCOIND_RPC_EXTERNAL_IP allows to set the correct ip address (default = 127.0.0.1)

Exposes the rpc api and zmq notifications (blockhash and rawtx)

Doesn't require a new install or an upgrade, just a restart of dojo

@LaurentMT
Copy link
Contributor Author

It might be a good idea to expose all ZMQ ports when this option is activated.
Some apps rely on notifications which aren't required by Dojo.
(e.g.: lnd requires zmqpubrawblock source: https://gist.github.com/05nelsonm/ef55dcc1fb3aa588c8135cd107ee5d8c)

@kenshin-samourai
Copy link
Contributor

support of additional ports and number of rpc threads implemented in PR #12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request my-dojo Something related to my-dojo
Projects
None yet
Development

No branches or pull requests

2 participants