start.sh 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #!/usr/bin/env bash
  2. set -e
  3. # Run a complete joystream development network on your machine using docker
  4. INIT_CHAIN_SCENARIO=${INIT_CHAIN_SCENARIO:=setupNewChain}
  5. if [ "${PERSIST}" == true ]
  6. then
  7. echo "Services startup up.."
  8. else
  9. # Clean start!
  10. docker-compose down -v
  11. function down()
  12. {
  13. # Stop containers and clear volumes
  14. docker-compose down -v
  15. }
  16. trap down EXIT
  17. fi
  18. ## Run a local development chain
  19. docker-compose up -d joystream-node
  20. ## Init the chain with some state
  21. export SKIP_MOCK_CONTENT=true
  22. export SKIP_QUERY_NODE_CHECKS=true
  23. HOST_IP=$(tests/network-tests/get-host-ip.sh)
  24. export COLOSSUS_1_URL="http://${HOST_IP}:3333"
  25. export COLOSSUS_1_TRANSACTOR_KEY=$(docker run --rm --pull=always docker.io/parity/subkey:2.0.1 inspect ${COLOSSUS_1_TRANSACTOR_URI} --output-type json | jq .ss58Address -r)
  26. export DISTRIBUTOR_1_URL="http://${HOST_IP}:3334"
  27. ./tests/integration-tests/run-test-scenario.sh ${INIT_CHAIN_SCENARIO}
  28. ## Member faucet
  29. docker-compose up -d faucet
  30. ## Query Node Infrastructure
  31. ./query-node/start.sh
  32. ## Storage Infrastructure Nodes
  33. docker-compose up -d colossus-1
  34. docker-compose up -d distributor-1
  35. ## Orion
  36. docker-compose up -d orion
  37. if [ "${PERSIST}" == true ]
  38. then
  39. echo "All services started in the background"
  40. else
  41. echo "use Ctrl+C to shutdown the development network."
  42. while true; do
  43. read
  44. done
  45. fi