start-dev 845 B

12345678910111213141516171819202122232425262728
  1. #!/bin/bash -e
  2. DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
  3. . "$DIR/.common.sh"
  4. # Ensure docker-compose exists
  5. if hash docker-compose 2>/dev/null; then
  6. cd "${DIR}/.."
  7. echo -e "${BLUE}❯ ${CYAN}Starting Dev Stack ...${RESET}"
  8. docker-compose up -d --remove-orphans --force-recreate --build
  9. echo ""
  10. echo -e "${CYAN}Admin UI: http://127.0.0.1:3081${RESET}"
  11. echo -e "${CYAN}Nginx: http://127.0.0.1:3080${RESET}"
  12. echo -e "${CYAN}Swagger Doc: http://127.0.0.1:3001${RESET}"
  13. echo ""
  14. if [ "$1" == "-f" ]; then
  15. echo -e "${BLUE}❯ ${YELLOW}Following Backend Container:${RESET}"
  16. docker logs -f npm_core
  17. else
  18. echo -e "${YELLOW}Hint:${RESET} You can follow the output of some of the containers with:"
  19. echo " docker logs -f npm_core"
  20. fi
  21. else
  22. echo -e "${RED}❯ docker-compose command is not available${RESET}"
  23. fi