You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
1.1 KiB

  1. #!/bin/sh -e
  2. USAGE="Available options:
  3. doc Start documentation UI at http://localhost:8001 and the mock up server at http://localhost:4010
  4. mock Start the mock up server at http://localhost:4010
  5. editor Start the documentation editor at http://localhost:8002
  6. stop Stop all runing services started using this script
  7. help display this message"
  8. case "$1" in
  9. doc)
  10. sudo docker-compose up -d hermez-api-doc hermez-api-mock && echo "\n\nStarted documentation UI at http://localhost:8001 and mockup server at http://localhost:4010"
  11. ;;
  12. mock)
  13. sudo docker-compose up -d hermez-api-mock && echo "\n\nStarted mockup server at http://localhost:4010"
  14. ;;
  15. editor)
  16. sudo docker-compose up -d hermez-api-editor hermez-api-mock && echo "\n\nStarted spec editor at http://localhost:8002 and mockup server at http://localhost:4010"
  17. ;;
  18. stop)
  19. sudo docker-compose rm -sf && echo "\n\nStopped all the services initialized by this script"
  20. ;;
  21. help)
  22. echo "$USAGE"
  23. ;;
  24. *)
  25. echo "Invalid option.\n\n$USAGE"
  26. ;;
  27. esac