start.sh 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. ## Query Node Infrastructure
  23. # Initialize a new database for the query node infrastructure
  24. docker-compose up -d db
  25. yarn workspace query-node-root db:prepare
  26. yarn workspace query-node-root db:migrate
  27. # Startup all query-node infrastructure services
  28. export WS_PROVIDER_ENDPOINT_URI=ws://joystream-node:9944
  29. docker-compose up -d graphql-server
  30. docker-compose up -d processor
  31. echo "press Ctrl+C to shutdown the development network"
  32. echo 'run: `yarn workspace pioneer start` in a separate terminal to bring up an instance of pioneer and \
  33. point your browser to http://localhost:3000/ to access the UI
  34. '
  35. while true; do
  36. read
  37. done