The main Bubble source repository. Contains the Bubble API server, the web UI, documentation and utilities. https://getbubblenow.com
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 

56 Zeilen
1.8 KiB

  1. #!/bin/bash
  2. #
  3. # Create a new user and start a network for that user
  4. #
  5. # Usage: create_user_and_network <json-file>
  6. #
  7. # json-file : a JSON file containing specs for the new user and network
  8. #
  9. # The default values are:
  10. #
  11. # {
  12. # "rootUsername": "root",
  13. # "rootPassword": "password",
  14. # "sageFqdn": "_required",
  15. # "nginxPort": "1443",
  16. # "username": "user-<<rand 5>>",
  17. # "password": "<<rand 10>>",
  18. # "network": "test-net-{{rand 5}}",
  19. # "email": "user-<<rand 5>>@example.com",
  20. # "domain": "bubblev.org",
  21. # "locale": "en_US",
  22. # "lang": "en",
  23. # "timezone": "EST",
  24. # "plan": "bubble pro",
  25. # "footprint": "Worldwide, excluding OFAC",
  26. # "compute": "VultrCompute",
  27. # "region": "New Jersey"
  28. # }
  29. #
  30. # The required fields above have a value of "_required". A minimal example would be:
  31. #
  32. # {
  33. # "sageFqdn": "api-XXXXX.staging.bubblev.org"
  34. # }
  35. #
  36. # This would add a user with a random name user-{{rand 5}} with a random password and random @example.com email address,
  37. # and a randomly named network with the name test-net-{{rand 5}}
  38. #
  39. # Environment variables
  40. #
  41. # BUBBLE_API : which API to use. Default is local (http://127.0.0.1:PORT, where PORT is found in .bubble.env)
  42. # BUBBLE_USER : account to use. Default is root
  43. # BUBBLE_PASS : password for account. Default is root
  44. # BUBBLE_SCRIPTS : location of run.sh script. Default is to assume it is in the same directory containing this script
  45. #
  46. SCRIPT="${0}"
  47. SCRIPT_DIR=$(cd $(dirname ${SCRIPT}) && pwd)
  48. . ${SCRIPT_DIR}/bubble_common
  49. JSON="${1:?no json provided}"
  50. if [[ ! -f "${JSON}" ]] ; then
  51. die "json file not found: ${JSON}"
  52. fi
  53. cat "${JSON}" | exec ${SCRIPT_DIR}/bscript debug ${SCRIPT_DIR}/../scripts/create_user_and_network.json --no-login --vars -