start.sh 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #!/usr/bin/env bash
  2. set -e
  3. # Run a complete joystream development network on your machine using docker.
  4. # Make sure to run build.sh prior to running this script.
  5. set -a
  6. . .env
  7. set +a
  8. # Clean start!
  9. docker-compose down -v
  10. function down()
  11. {
  12. # Stop containers and clear volumes
  13. docker-compose down -v
  14. }
  15. trap down EXIT
  16. # Run a local development chain
  17. docker-compose up -d joystream-node
  18. ## Storage Infrastructure
  19. # Configure a dev storage node and start storage node
  20. DEBUG=joystream:storage-cli:dev yarn storage-cli dev-init
  21. docker-compose up -d colossus
  22. # Create a new content directory lead
  23. yarn workspace api-scripts initialize-content-lead
  24. ## Query Node Infrastructure
  25. # Initialize a new database for the query node infrastructure
  26. docker-compose up -d db
  27. yarn workspace query-node-root db:prepare
  28. yarn workspace query-node-root db:migrate
  29. # Startup all query-node infrastructure services
  30. export WS_PROVIDER_ENDPOINT_URI=ws://joystream-node:9944
  31. docker-compose up -d graphql-server
  32. docker-compose up -d processor
  33. echo "press Ctrl+C to shutdown the development network"
  34. echo 'run: `yarn workspace pioneer start` in a separate terminal to bring up an instance of pioneer and \
  35. point your browser to http://localhost:3000/ to access the UI
  36. '
  37. while true; do
  38. read
  39. done