The main Bubble source repository. Contains the Bubble API server, the web UI, documentation and utilities. https://getbubblenow.com
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 

46 linhas
1.2 KiB

  1. #!/bin/bash
  2. #
  3. # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/
  4. #
  5. # Build or run a docker container for a Bubble launcher
  6. #
  7. # -- Building a Docker image:
  8. #
  9. # bubble.sh build [tag-name]
  10. #
  11. # tag-name : name of the docker tag to apply, default is bubble/bubble_launcher:X
  12. #
  13. # -- Running a Docker image:
  14. #
  15. # bubble.sh run [tag-name]
  16. #
  17. # tag-name : name of the docker tag to use, default is bubble/bubble_launcher:X
  18. #
  19. function die {
  20. echo 1>&2 "${1}"
  21. exit 1
  22. }
  23. THISDIR="$(cd "$(dirname "${0}")" && pwd)"
  24. cd "${THISDIR}/.." || die "Directory not found: ${THISDIR}/.."
  25. DEFAULT_TAG="bubble/bubble_launcher:0.2"
  26. MODE=${1:?no mode specified, use build or run}
  27. TAG=${2:-${DEFAULT_TAG}}
  28. if [[ "${MODE}" == "build" ]] ; then
  29. if [[ $(find bubble-server/target -type f -name "bubble-server-*.jar" | wc -l | tr -d ' ') -eq 0 ]] ; then
  30. die "No bubble jar found in $(pwd)/bubble-server/target"
  31. fi
  32. docker build -t bubble/test:0.1 .
  33. elif [[ "${MODE}" == "run" ]] ; then
  34. docker run --env-file <(cat "${HOME}/.bubble.env" | sed -e 's/export //' | tr -d '"' | tr -d "'") -p 8090:8090 -t bubble/test:0.1
  35. else
  36. die "Invalid mode (expected build or run): ${MODE}"
  37. fi