start.sh 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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-docker-images.sh prior to running this script to use
  5. # the local build.
  6. set -a
  7. . .env
  8. set +a
  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. # Run a local development chain
  18. docker-compose up -d joystream-node
  19. ## Storage Infrastructure
  20. # Configure a dev storage node and start storage node
  21. DEBUG=joystream:storage-cli:dev yarn storage-cli dev-init
  22. docker-compose up -d colossus
  23. # Create a new content directory lead
  24. yarn workspace api-scripts initialize-content-lead
  25. # Set sudo as the membership screening authority
  26. yarn workspace api-scripts set-sudo-as-screening-auth
  27. ## Query Node Infrastructure
  28. # Initialize a new database for the query node infrastructure
  29. docker-compose up -d db
  30. yarn workspace query-node-root db:prepare
  31. yarn workspace query-node-root db:migrate
  32. # Startup all query-node infrastructure services
  33. export WS_PROVIDER_ENDPOINT_URI=ws://joystream-node:9944
  34. docker-compose up -d graphql-server
  35. docker-compose up -d processor
  36. docker-compose up -d pioneer
  37. echo "use Ctrl+C to shutdown the development network."
  38. while true; do
  39. read
  40. done