start.sh 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. export WS_PROVIDER_ENDPOINT_URI=ws://joystream-node:9944/
  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. # Initialise the content directory with standard classes, schemas and initial entities
  24. yarn workspace @joystream/cd-schemas initialize:dev
  25. ## Query Node Infrastructure
  26. # Initialize a new database for the query node infrastructure
  27. docker-compose up -d db
  28. yarn workspace query-node-root db:migrate
  29. # Startup all query-node infrastructure services
  30. docker-compose up -d graphql-server
  31. docker-compose up -d processor
  32. echo "press Ctrl+C to shutdown"
  33. # Start a dev instance of pioneer and wait for exit
  34. docker-compose up pioneer