start.sh 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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:=setup-new-chain}
  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. HOST_IP=$(tests/network-tests/get-host-ip.sh)
  23. export COLOSSUS_1_URL="http://${HOST_IP}:3333"
  24. export DISTRIBUTOR_1_URL="http://${HOST_IP}:3334"
  25. ./tests/network-tests/run-test-scenario.sh ${INIT_CHAIN_SCENARIO}
  26. ## Set sudo as the membership screening authority
  27. yarn workspace api-scripts set-sudo-as-screening-auth
  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. ## Pioneer UI
  36. docker-compose up -d pioneer
  37. ## Orion
  38. docker-compose up -d orion
  39. if [ "${PERSIST}" == true ]
  40. then
  41. echo "All services started in the background"
  42. else
  43. echo "use Ctrl+C to shutdown the development network."
  44. while true; do
  45. read
  46. done
  47. fi