deploy-qn.sh 769 B

12345678910111213141516171819202122
  1. #!/usr/bin/env bash
  2. set -e
  3. SCRIPT_PATH="$(dirname "${BASH_SOURCE[0]}")"
  4. cd $SCRIPT_PATH
  5. # Bring up db
  6. docker-compose up -d db
  7. # Make sure we use dev config for db migrations (prevents "Cannot create database..." and some other errors)
  8. docker-compose run --rm --entrypoint sh graphql-server -c "yarn workspace query-node config:dev"
  9. # Migrate the databases
  10. docker-compose run --rm --entrypoint sh graphql-server -c "yarn workspace query-node-root db:prepare"
  11. docker-compose run --rm --entrypoint sh graphql-server -c "yarn workspace query-node-root db:migrate"
  12. # Start indexer and gateway
  13. docker-compose up -d indexer
  14. docker-compose up -d hydra-indexer-gateway
  15. # Start processor and graphql server
  16. docker-compose up -d processor
  17. docker-compose up -d graphql-server