Required packages: nodejs, npm (prefered instalation via nvm)
Clone repository
Navigate to blockchain-worker
folder
Install dependencies npm install
Copy .env.example
as .env, and modify its contents as in Configuration file section;
Run command npm start
Execute command in project directory:
docker build -t supplier-listener-blockchain-worker .
Result should look like:
(...)
Successfully built IMAGE_ID
To run image execute (docker env as file or params is required):
docker run -i <place docker envs here> IMAGE_ID
If there is no env specified Blockchain Worker will stop execution.
All-in-one command which will build image and run it (ensure that the path to config is correct).
docker run -i <place docker envs here> `docker build -q .`
Running from sources
- it will expect .env in project folder.
Running in docker container
- it will expect env specified as docker env file or parameters.
dApp monitored for action requests:
DAPP='3NBPqqjDH2eYmoHeXNPnHhLvA7D4UDQXQcx'
Functions called in dApp in order to make action on device (separated by "|"):
DAPP_FUNCS='deviceAction|deviceActionAs'
Url to node used for monitoring state of dApp:
NODE_URL='
https://nodes-testnet.wavesnodes.com
'
Number of blocks over parsed one higher values are safer but slower.
SAFETY_LEVEL=0
Checking interval for new transactions
CHECK_INTERVAL=1000
Blockchain updates extension port
NODE_GRPC_EVENTS_PORT='localhost:6881'
Grpc extension port
NODE_GRPC_PORT='10.0.0.7:6877'
Redis server address
REDIS_HOST="127.0.0.1"
Redis server port
REDIS_PORT="6379"