diff --git a/README.md b/README.md index 39d0320b5..e50ac24d3 100644 --- a/README.md +++ b/README.md @@ -263,6 +263,9 @@ There is also an automated deployment of the **Hyperledger Explorer** available ## Docker +* Hyperledger Explorer docker repository `https://hub.docker.com/r/hyperledger/explorer/` +* Hyperledger Explorer PostgreSQL docker repository `https://hub.docker.com/r/hyperledger/explorer-db` + ### Steps to deploy using Docker From new terminal. diff --git a/deploy_explorer.sh b/deploy_explorer.sh index 65cfa622e..6c5c13bbb 100755 --- a/deploy_explorer.sh +++ b/deploy_explorer.sh @@ -90,12 +90,12 @@ function config(){ subnet=192.168.10.0/24 # database container configuration - fabric_explorer_db_tag="hyperledger-blockchain-explorer-db" + fabric_explorer_db_tag="hyperledger/explorer-db" fabric_explorer_db_name="blockchain-explorer-db" db_ip=192.168.10.11 # fabric explorer configuratio - fabric_explorer_tag="hyperledger-blockchain-explorer" + fabric_explorer_tag="hyperledger/explorer" fabric_explorer_name="blockchain-explorer" explorer_ip=192.168.10.12 # END: GLOBAL VARIABLES OF THE SCRIPT @@ -190,8 +190,8 @@ function deploy_run_explorer(){ -e DATABASE_PASSWD=$explorer_db_pwd \ -v $network_config_file:/opt/explorer/app/platform/fabric/config.json \ -v $network_crypto_base_path:/tmp/crypto \ - -p 8080:8080 \ - hyperledger-blockchain-explorer + -p 8090:8080 \ + $fabric_explorer_tag } function connect_to_network(){ diff --git a/examples/net1/README.md b/examples/net1/README.md index de05b20e2..f59cda387 100644 --- a/examples/net1/README.md +++ b/examples/net1/README.md @@ -276,8 +276,8 @@ Note: Make sure you put the right node IPs, ports and certs paths before running "path": "/tmp/crypto/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt" }, - "url": "grpcs://peer1.org1.example.com:8051", - "eventUrl": "grpcs://peer1.org1.example.com:8053", + "url": "grpcs://peer1.org1.example.com:7051", + "eventUrl": "grpcs://peer1.org1.example.com:7053", "grpcOptions": { "ssl-target-name-override": "peer1.org1.example.com" } @@ -287,8 +287,8 @@ Note: Make sure you put the right node IPs, ports and certs paths before running "path": "/tmp/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt" }, - "url": "grpcs://peer0.org2.example.com:9051", - "eventUrl": "grpcs://peer0.org2.example.com:9053", + "url": "grpcs://peer0.org2.example.com:7051", + "eventUrl": "grpcs://peer0.org2.example.com:7053", "grpcOptions": { "ssl-target-name-override": "peer0.org2.example.com" } @@ -298,8 +298,8 @@ Note: Make sure you put the right node IPs, ports and certs paths before running "path": "/tmp/crypto/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt" }, - "url": "grpcs://peer1.org2.example.com:10051", - "eventUrl": "grpcs://peer1.org2.example.com:10053", + "url": "grpcs://peer1.org2.example.com:7051", + "eventUrl": "grpcs://peer1.org2.example.com:7053", "grpcOptions": { "ssl-target-name-override": "peer1.org2.example.com" } @@ -319,5 +319,32 @@ Note: Make sure you put the right node IPs, ports and certs paths before running 4. in case if port 8080 is occupied in your system, the `deploy_explorer.sh` should be updated. Please update the line 193 `-p 8080:8080 \` to `-p :8080 \`, where is a free port, where BE can be browsed. -5. issue `./deploy_explorer.sh net_byfn` and wait. -6. open the browser `http://localhost:` and explore the blockchain network. \ No newline at end of file +5. issue `./deploy_explorer.sh net_byfn` and wait, example: `./deploy_explorer.sh net1 net_byfn` +6. open the browser `http://localhost:` and explore the blockchain network. + +### Docker Troubleshooting commands + List your networks + $docker network ls + List docker images id + $docker images | grep block + Remove an image + $docker rmi + Login to docker + $docker exec -it sh + Read explorer app log + $docker exec cat /opt/logs/app/app.log + Inspect real IP's + $docker inspect | grep IPAddress + Stop and remove dockers + $docker stop $(docker ps -a -q) + $docker rm -f $(docker ps -a -q) + Remove default fabric crypto + $rm -rf ./crypto-config/* + $rm -rf ~/.hfc* + From the docker ($docker exec -it sh) + Install curl: + $apk update && apk add curl + Use curl in docker to query explorer REST API + Example: + $curl http://localhost:8080/api/channels + Example response: {"status":200,"channels":["dockerchannel","mychannel"]