github.com/evdatsion/aphelion-dpos-bft@v0.32.1/networks/local/README.md (about)

     1  # Local Cluster with Docker Compose
     2  
     3  DEPRECATED!
     4  
     5  See the [docs](https:/.com/docs/networks/docker-compose.html).
     6  
     7  ## Requirements
     8  
     9  - [Install tendermint](/docs/install.md)
    10  - [Install docker](https://docs.docker.com/engine/installation/)
    11  - [Install docker-compose](https://docs.docker.com/compose/install/)
    12  
    13  ## Build
    14  
    15  Build the `tendermint` binary and the `tendermint/localnode` docker image.
    16  
    17  Note the binary will be mounted into the container so it can be updated without
    18  rebuilding the image.
    19  
    20  ```
    21  cd $GOPATH/src/github.com/evdatsion/aphelion-dpos-bft
    22  
    23  # Build the linux binary in ./build
    24  make build-linux
    25  
    26  # Build tendermint/localnode image
    27  make build-docker-localnode
    28  ```
    29  
    30  
    31  ## Run a testnet
    32  
    33  To start a 4 node testnet run:
    34  
    35  ```
    36  make localnet-start
    37  ```
    38  
    39  The nodes bind their RPC servers to ports 26657, 26660, 26662, and 26664 on the host.
    40  This file creates a 4-node network using the localnode image.
    41  The nodes of the network expose their P2P and RPC endpoints to the host machine on ports 26656-26657, 26659-26660, 26661-26662, and 26663-26664 respectively.
    42  
    43  To update the binary, just rebuild it and restart the nodes:
    44  
    45  ```
    46  make build-linux
    47  make localnet-stop
    48  make localnet-start
    49  ```
    50  
    51  ## Configuration
    52  
    53  The `make localnet-start` creates files for a 4-node testnet in `./build` by calling the `tendermint testnet` command.
    54  
    55  The `./build` directory is mounted to the `` mount point to attach the binary and config files to the container.
    56  
    57  For instance, to create a single node testnet:
    58  
    59  ```
    60  cd $GOPATH/src/github.com/evdatsion/aphelion-dpos-bft
    61  
    62  # Clear the build folder
    63  rm -rf ./build
    64  
    65  # Build binary
    66  make build-linux
    67  
    68  # Create configuration
    69  docker run -e LOG="stdout" -v `pwd`/build: tendermint/localnode testnet --o . --v 1
    70  
    71  #Run the node
    72  docker run -v `pwd`/build: tendermint/localnode
    73  
    74  ```
    75  
    76  ## Logging
    77  
    78  Log is saved under the attached volume, in the `tendermint.log` file. If the `LOG` environment variable is set to `stdout` at start, the log is not saved, but printed on the screen.
    79  
    80  ## Special binaries
    81  
    82  If you have multiple binaries with different names, you can specify which one to run with the BINARY environment variable. The path of the binary is relative to the attached volume.
    83