You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1020 B

  1. #! /bin/bash
  2. set -eu
  3. DOCKER_IMAGE=$1
  4. NETWORK_NAME=$2
  5. ID=$3
  6. APP_PROXY=$4
  7. set +u
  8. SEEDS=$5
  9. set -u
  10. if [[ "$SEEDS" != "" ]]; then
  11. SEEDS=" --seeds $SEEDS "
  12. fi
  13. set +eu
  14. echo "starting tendermint peer ID=$ID"
  15. # start tendermint container on the network
  16. if [[ "$CIRCLECI" == true ]]; then
  17. set -u
  18. docker run -d \
  19. --net=$NETWORK_NAME \
  20. --ip=$(test/p2p/ip.sh $ID) \
  21. --name local_testnet_$ID \
  22. --entrypoint tendermint \
  23. -e TMROOT=/go/src/github.com/tendermint/tendermint/test/p2p/data/mach$ID/core \
  24. --log-driver=syslog \
  25. --log-opt syslog-address=udp://127.0.0.1:5514 \
  26. --log-opt syslog-facility=daemon \
  27. --log-opt tag="{{.Name}}" \
  28. $DOCKER_IMAGE node $SEEDS --log_level=debug --proxy_app=$APP_PROXY
  29. else
  30. set -u
  31. docker run -d \
  32. --net=$NETWORK_NAME \
  33. --ip=$(test/p2p/ip.sh $ID) \
  34. --name local_testnet_$ID \
  35. --entrypoint tendermint \
  36. -e TMROOT=/go/src/github.com/tendermint/tendermint/test/p2p/data/mach$ID/core \
  37. $DOCKER_IMAGE node $SEEDS --log_level=info --proxy_app=$APP_PROXY
  38. fi