start.sh 1.1 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. # Initialise the content directory with standard classes, schemas and initial entities
  23. yarn workspace @joystream/cd-schemas initialize:dev
  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:migrate
  28. # Startup all query-node infrastructure services
  29. docker-compose up -d graphql-server
  30. docker-compose up -d processor
  31. docker-compose up -d pioneer
  32. echo "use Ctrl+C to shutdown the development network."
  33. while true; do
  34. read
  35. done