start.sh 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #!/usr/bin/env bash
  2. set -e
  3. # Avoid pulling joystream images from docker hub. It is most likely
  4. # not the version that we want to work with.
  5. # either build with `docker-compose build` or `docker pull` the image versions equired
  6. if ! docker inspect joystream/node:latest > /dev/null 2>&1;
  7. then
  8. echo "Didn't find a joystream/node:latest docker image."
  9. exit 1
  10. fi
  11. if ! docker inspect joystream/apps:latest > /dev/null 2>&1;
  12. then
  13. echo "Didn't find a joystream/apps:latest docker image."
  14. exit 1
  15. fi
  16. # clean start!
  17. docker-compose down -v
  18. function down()
  19. {
  20. # Stop containers and clear volumes
  21. docker-compose down -v
  22. }
  23. trap down EXIT
  24. # Run a development joystream-node chain
  25. docker-compose up -d joystream-node
  26. # configure a dev storage node and start storage node
  27. DEBUG=joystream:storage-cli:dev yarn storage-cli dev-init
  28. docker-compose up -d colossus
  29. # Initialise the content directory with standard classes, schemas and initial entities
  30. yarn workspace cd-schemas initialize:dev
  31. # Initialize a new database for the query node infrastructure
  32. docker-compose up -d db
  33. yarn workspace query-node-root db:migrate
  34. # Startup all query-node infrastructure services
  35. docker-compose up -d processor
  36. echo "press Ctrl+C to shutdown"
  37. # Start a dev instance of pioneer and wait for exit
  38. docker-compose up pioneer