start-dev.sh 953 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/usr/bin/env bash
  2. set -e
  3. # Avoid pulling joystream/node from docker hub. It is most likely
  4. # not the version that we want to work with. Either you should
  5. # build it locally or pull it down manually.
  6. if ! docker inspect joystream/node:latest > /dev/null 2>&1;
  7. then
  8. echo "Didn't find local joystream/node:latest docker image."
  9. exit 1
  10. fi
  11. SCRIPT_PATH="$(dirname "${BASH_SOURCE[0]}")"
  12. cd $SCRIPT_PATH
  13. # stop prior run and clear volumes
  14. # docker-compose down -v
  15. function down()
  16. {
  17. # Stop containers and clear volumes
  18. docker-compose down -v
  19. }
  20. # Run a development joystream-node chain and ipfs daemon in the background
  21. docker-compose up -d ipfs
  22. docker-compose up -d joystream-node
  23. trap down EXIT
  24. # configure the dev chain
  25. DEBUG=joystream:storage-cli:dev yarn storage-cli dev-init
  26. # Run the tests
  27. # Tests sometimes fail, so skip for now
  28. # yarn workspace storage-node test
  29. # Start Colossus storage-node
  30. DEBUG=joystream:* yarn colossus --dev