Makefile 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. process: migrate
  2. @SQD_DEBUG=sqd:processor:mapping node -r dotenv-expand/config lib/processor.js
  3. install:
  4. @npm install
  5. build:
  6. @npm run build
  7. build-processor-image:
  8. @docker build . --target processor -t orion-processor
  9. build-query-node-image:
  10. @docker build . --target query-node -t orion-api
  11. build-images: build-processor-image build-query-node-image
  12. serve:
  13. @npx squid-graphql-server --subscriptions
  14. migrate:
  15. @npx squid-typeorm-migration apply
  16. dbgen:
  17. @npx squid-typeorm-migration generate
  18. codegen:
  19. @npm run generate:schema || true
  20. @npx squid-typeorm-codegen
  21. typegen:
  22. @npx squid-substrate-typegen typegen.json
  23. prepare: install codegen build
  24. @mkdir db/persisted || true
  25. up-squid:
  26. @docker network create joystream_default || true
  27. @docker-compose up -d
  28. up-archive:
  29. @docker network create joystream_default || true
  30. @docker-compose -f archive/docker-compose.yml up -d
  31. up: up-archive up-squid
  32. down-squid:
  33. @./db/export.sh
  34. @docker-compose down -v
  35. down-archive:
  36. @docker-compose -f archive/docker-compose.yml down -v
  37. down: down-squid down-archive
  38. .PHONY: build serve process migrate codegen typegen prepare up-squid up-archive up down-squid down-archive down