Search code examples
hyperledger-fabrichyperledgerhyperledger-fabric-ca

How to start/stop/restart the fabric nodes


I am using https://github.com/hyperledger/fabric-samples/tree/release-1.1/fabric-ca for my setup.

Is this way correct to start/stop/restart the fabric nodes:

  • docker-compose stop

  • remove setup and run

  • docker-compose start

Or is there any other correct way to do this?

Thanks for any help!

EDIT: Added the answer


Solution

  • Here are the changes I made to stop and start the network

    Stop the network: docker-compose stop

    Before starting it again, remove setup from docker compose and change the container scripts.

    For CA scripts: replace everything with fabric-ca-server start
    For orderer, just have: orderer
    For peer, just have: peer node start
    You don't need the fabric-ca-tool container but if you are starting it, make sure you remove all channel and chaincode logic from main method of run script.

    Start the network: docker-compose start