Faucet Dockerfile

Next logical step is to build an image, where we can actually run the faucet. We will need nodejs — so let’s use the same version as we have used in the previous article for our ReasonML environment. (node:11.4)

Then, we will have to fill out a bunch of ENV variables, in order for the faucet to function properly. Let’s go trough the variables and explain how and where to obtain the needed values.

API_HOST:

This will be the docker-network URL of the container, where our NEM Rest gateway runs, we know that in our setup, name of the container is catapult-service-bootstrap_rest-gateway_1

API_PORT:

This is the default gateway port, 3000.

PRIVATE_KEY:

This is a private_key of an account, generated when our catapult stack starts. Part of so-called nemesis addresses, that are pre-populated with xem.

How can you find the required private key? First step is to launch the catapult stack.

Then, navigate to catapult-service-bootstrap/build/generated-addresses/addresses.yaml, and look for nemesis_addresses.

Take the first private key that you find, it should be populated with enough xem to fuel our faucet.

So our value value will be:

F1C69759140256420EB42CF39906A01DD02A57FB6D0676AE134343A13A1CBC21