start.sh 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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-docker-images.sh prior to running this script to use
  5. # the local build.
  6. # Clean start!
  7. docker-compose down -v
  8. function down()
  9. {
  10. # Stop containers and clear volumes
  11. docker-compose down -v
  12. }
  13. trap down EXIT
  14. ## Run a local development chain
  15. docker-compose up -d joystream-node
  16. ## Init the chain with some state
  17. SKIP_MOCK_CONTENT=true ./tests/network-tests/run-test-scenario.sh setup-new-chain
  18. ## Set sudo as the membership screening authority
  19. yarn workspace api-scripts set-sudo-as-screening-auth
  20. ## Query Node Infrastructure
  21. # Initialize a new database for the query node infrastructure
  22. docker-compose up -d db
  23. # Make sure we use dev config for db migrations (prevents "Cannot create database..." and some other errors)
  24. docker-compose run --rm --entrypoint sh graphql-server -c "yarn workspace query-node config:dev"
  25. # Migrate the databases
  26. docker-compose run --rm --entrypoint sh graphql-server -c "yarn workspace query-node-root db:prepare"
  27. docker-compose run --rm --entrypoint sh graphql-server -c "yarn workspace query-node-root db:migrate"
  28. # Start indexer and gateway
  29. docker-compose up -d indexer
  30. docker-compose up -d hydra-indexer-gateway
  31. # Start processor and graphql server
  32. docker-compose up -d processor
  33. docker-compose up -d graphql-server
  34. ## Storage Infrastructure
  35. docker-compose up -d colossus-1
  36. docker-compose up -d distributor-1
  37. ## Pioneer UI
  38. docker-compose up -d pioneer
  39. echo "use Ctrl+C to shutdown the development network."
  40. while true; do
  41. read
  42. done