The main Bubble source repository. Contains the Bubble API server, the web UI, documentation and utilities. https://getbubblenow.com
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 

75 wiersze
2.6 KiB

  1. # -*- mode: ruby -*-
  2. # vi: set ft=ruby :
  3. # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/
  4. #
  5. # ==================
  6. # Bubble Vagrantfile
  7. # ==================
  8. # Running `vagrant up` will create a full Bubble development environment, and
  9. # optionally start a local launcher.
  10. #
  11. # ## Environment Variables
  12. #
  13. # ### LETSENCRYPT_EMAIL
  14. # If you specify the LETSENCRYPT_EMAIL environment variable, then `vagrant up` will also
  15. # start a Local Launcher (see docs/local-launcher.md) which is your starting point for
  16. # launching new Bubbles.
  17. #
  18. # ### BUBBLE_PORT
  19. # By default, Bubble will listen on port 8090.
  20. # If something else is already using that port on your computer, `vagrant up` will fail.
  21. # Set the `BUBBLE_PORT` environment variable to another port, and Bubble will listen on
  22. # that port instead.
  23. #
  24. # ### BUBBLE_TAG
  25. # By default, the Vagrant box will run the bleeding edge (`master` branch) of Bubble.
  26. # Set the `BUBBLE_TAG` environment variable to the name of a git branch or tag to check
  27. # out instead.
  28. #
  29. #
  30. Vagrant.configure("2") do |config|
  31. config.vm.box = "ubuntu/focal64"
  32. # You can access the launcher on port 8090 (or BUBBLE_PORT) but only on 127.0.0.1
  33. # If you want to allow outside access to port 8090 (listen on 0.0.0.0), use the version below
  34. config.vm.network "forwarded_port", guest: 8090, host: ENV['BUBBLE_PORT'] || 8090, host_ip: "127.0.0.1"
  35. # Anyone who can reach port 8090 on this system will be able to access the launcher
  36. # config.vm.network "forwarded_port", guest: 8090, host: ENV['BUBBLE_PORT'] || 8090
  37. config.vm.provision :shell do |s|
  38. s.inline = <<-SHELL
  39. apt-get update -y
  40. apt-get upgrade -y
  41. SHELL
  42. end
  43. config.vm.provision :shell do |s|
  44. s.env = {
  45. LETSENCRYPT_EMAIL: ENV['LETSENCRYPT_EMAIL'],
  46. BUBBLE_TAG: ENV['BUBBLE_TAG'] || 'master'
  47. }
  48. s.privileged = false
  49. s.inline = <<-SHELL
  50. # Get the code
  51. git clone https://git.bubblev.org/bubblev/bubble.git
  52. cd bubble && git fetch && git pull origin ${BUBBLE_TAG}
  53. # Initialize the system
  54. ./bin/first_time_ubuntu.sh
  55. # Clone and build all dependencies
  56. SKIP_BUBBLE_BUILD=1 ./bin/first_time_setup.sh
  57. # Build the bubble jar
  58. MVN_QUIET=""
  59. BUBBLE_PRODUCTION=1 mvn ${MVN_QUIET} -Pproduction clean package
  60. # Start the Local Launcher if LETSENCRYPT_EMAIL is defined
  61. if [[ -n \"${LETSENCRYPT_EMAIL}\" ]] ; then
  62. echo \"export LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}\" > bubble.env
  63. # ./bin/run.sh bubble.env
  64. fi
  65. SHELL
  66. end
  67. end