start.sh 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. ./tests/network-tests/run-test-scenario.sh ${INIT_CHAIN_SCENARIO}
  23. ## Set sudo as the membership screening authority
  24. yarn workspace api-scripts set-sudo-as-screening-auth
  25. ## Query Node Infrastructure
  26. ./query-node/start.sh
  27. ## Storage Infrastructure
  28. docker-compose up -d colossus-1
  29. docker-compose up -d distributor-1
  30. ## Pioneer UI
  31. docker-compose up -d pioneer
  32. if [ "${PERSIST}" == true ]
  33. then
  34. echo "All services started in the background"
  35. else
  36. echo "use Ctrl+C to shutdown the development network."
  37. while true; do
  38. read
  39. done
  40. fi