run-dev-instance.sh 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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 if you that is what you want
  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. # stop prior run and clear volumes
  13. docker-compose -f ${SCRIPT_PATH}/compose/devchain-and-ipfs-node/docker-compose.yaml down -v
  14. # Run a development joystream-node chain and ipfs daemon in the background
  15. # Will use latest joystream/node images,
  16. # and will fetch from dockerhub if not found, so build them locally if
  17. # you need the version from the current branch
  18. docker-compose -f ${SCRIPT_PATH}/compose/devchain-and-ipfs-node/docker-compose.yaml up -d
  19. # configure the dev chain
  20. DEBUG=joystream:storage-cli:dev yarn storage-cli dev-init
  21. # Run the tests
  22. # Tests sometimes fail, so skip for now
  23. # yarn workspace storage-node test
  24. # Run the server in background
  25. # DEBUG=joystream:storage* yarn colossus --dev > ${SCRIPT_PATH}/colossus.log 2>&1 &
  26. # PID= ???
  27. # echo "Development storage node is running in the background process id: ${PID}""
  28. # prompt for pressing ctrl-c..
  29. # kill colossus and docker containers...
  30. # docker-compose -f ${SCRIPT_PATH}/compose/devchain-and-ipfs-node/docker-compose.yaml down -v
  31. # Run the server, without logging ranges debug info, too verbose
  32. DEBUG=joystream:*,-joystream:util:ranges yarn colossus --dev