To use this BlockChain REST service, follow this guide:
-
First step is build the BlockChain_REST_Service image docker. For this we move to BlockChain_REST_Service (cloned) directory and run the command
sudo docker build - -t "bcdb_service" < Dockerfile.dev. -
Next step is clone BigChainDB server official repo: https://github.com/bigchaindb/bigchaindb and overwrite the
docker-compose.ymlwith the one in my repo. Now you have ready BigChainDB server. -
In your work directory, you must have the official BigChainDB server repo overwrited and this repo, as follows:
Your_work_directory |____BlockChain_Rest_Service |____bigchaindb -
Edit the overwritten docker-compose.yml. Uncoment the
bcdb_serviceblock, that manages the bcdb_service behaviour, and configure it agree to your preferences (ips, ports, directories...). It is instinctive. -
Edit the
BlockChain_REST_Service/src/app.pyfile. In thebcbd = bcc("http://yourbigchaindburl:9984/")line, change the domain reserved and port you gave in the last step in the URL. If you want to test it in localhost, you must, obviously, changeyourbigchaindburlforlocalhostor127.0.0.1. -
Finished. If you want to run BigChainDB server and Flask application, you must go to bigchaindb directory and run in a terminal
docker-compose up. If you did all right, it will start properly everything.