start-dev.sh 912 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. # Run a development joystream-node chain and ipfs daemon in the background
  16. docker-compose up -d
  17. function down()
  18. {
  19. # Stop containers and clear volumes
  20. docker-compose down -v
  21. }
  22. trap down EXIT
  23. # configure the dev chain
  24. DEBUG=joystream:storage-cli:dev yarn storage-cli dev-init
  25. # Run the tests
  26. # Tests sometimes fail, so skip for now
  27. # yarn workspace storage-node test
  28. # Start Colossus storage-node
  29. DEBUG=joystream:* yarn colossus --dev