start.sh 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. # Clean start!
  6. docker-compose down -v
  7. function down()
  8. {
  9. # Stop containers and clear volumes
  10. docker-compose down -v
  11. }
  12. trap down EXIT
  13. # Run a local development chain
  14. docker-compose up -d joystream-node
  15. export WS_PROVIDER_ENDPOINT_URI=ws://joystream-node:9944/
  16. ## Storage Infrastructure
  17. # Configure a dev storage node and start storage node
  18. DEBUG=joystream:storage-cli:dev yarn storage-cli dev-init
  19. docker-compose up -d colossus
  20. # Initialise the content directory with standard classes, schemas and initial entities
  21. yarn workspace @joystream/cd-schemas initialize:dev
  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:migrate
  26. TYPEORM_DATABASE=query_node_processor yarn workspace query-node-root db:indexer:migrate
  27. # Startup all query-node infrastructure services
  28. docker-compose up -d graphql-server
  29. docker-compose up -d processor
  30. echo "press Ctrl+C to shutdown"
  31. # Start a dev instance of pioneer and wait for exit
  32. docker-compose up pioneer