This is the backend service which runs along with ethereum and tracks the network status, fetches information through JSON-RPC and connects through WebSockets to eth-netstats to feed information. For full install instructions please read the wiki.
The expectation is that this is used with the Docker images from Immutability's GitHub repositories:
There is a Dockerfile in the root directory of the repository. The intent of this fork of https://github.com/cubedro/eth-net-intelligence-api is to provide a Docker container that is lightweight and easy to use with the other Immutability docker containers. Therefore this documentation is only for that use case.
The 'app.json.example' file contains a sample of a 2 node configuration.
[
{
"name": "ethereum-wallet",
"cwd": ".",
"script": "app.js",
"log_date_format": "YYYY-MM-DD HH:mm Z",
"merge_logs": false,
"watch": false,
"exec_interpreter": "node",
"exec_mode": "fork_mode",
"env": {
"NODE_ENV": "private",
"RPC_HOST": "ethereum-wallet",
"RPC_PORT": "8545",
"INSTANCE_NAME": "ethereum-wallet",
"WS_SERVER": "http://ethstats:3000",
"WS_SECRET": ""
}
},
{
"name": "ethereum-etherbase",
"cwd": ".",
"script": "app.js",
"log_date_format": "YYYY-MM-DD HH:mm Z",
"merge_logs": false,
"watch": false,
"exec_interpreter": "node",
"exec_mode": "fork_mode",
"env": {
"NODE_ENV": "private",
"RPC_HOST": "ethereum-etherbase",
"RPC_PORT": "8545",
"INSTANCE_NAME": "ethereum-etherbase",
"WS_SERVER": "http://ethstats:3000",
"WS_SECRET": ""
}
}
]
There are some important things to note:
- The
RPC_HOSTrefers to the network alias for the 2gethnodes. - The
WS_SERVERuses the network alias of theeth-netstatscontainer. WS_SECRETneeds to be configured. The sameWS_SECRETneeds to be configured here as with theeth-netstatscontainer.
Run it using Docker:
$ docker pull immutability/eth-net-intelligence-api
$ docker run -d -P --name ethnetintel \
--network ethereum \
--network-alias ethnetintel \
-v /Users/secrets/app.json:/opt/app.json \
immutability/eth-net-intelligence-api:latest