The main Bubble source repository. Contains the Bubble API server, the web UI, documentation and utilities. https://getbubblenow.com
Não pode escolher mais do que 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.

dev_vagrant.md 3.6 KiB

há 4 anos
há 4 anos
há 4 anos
há 4 anos
há 4 anos
há 4 anos
há 4 anos
há 4 anos
há 4 anos
há 4 anos
há 4 anos
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. Bubble Vagrant Developer Setup
  2. ==============================
  3. [Vagrant](https://www.vagrantup.com/) is a popular way to run pre-packaged software on virtual machines
  4. like VirtualBox and VMware.
  5. # Requirements
  6. Before starting a Bubble Vagrant box, you'll need install some software if you don't already have it:
  7. * [VirtualBox](https://www.virtualbox.org/)
  8. * [Vagrant](https://www.vagrantup.com/)
  9. # Configuration
  10. There are a few environment variables you can use to configure how the Vagrant box is initialized.
  11. ## Port Selection
  12. Do you have anything already listening on port 8090? If so, set the `BUBBLE_PORT` environment
  13. variable to some free port where the Bubble API can listen. Otherwise, it defaults to 8090.
  14. ## Local Launcher and SSL Certificates
  15. Do you want to use this setup as a local launcher to start new Bubbles? If so, set
  16. the `LETSENCRYPT_EMAIL` environment variable to an email address that will be registered with
  17. [LetsEncrypt](https://letsencrypt.org/) when your Bubbles need to install SSL certificates.
  18. ## Other Settings
  19. Read the Bubble [Vagrantfile](../Vagrantfile) for full information on all settings.
  20. # Starting
  21. To start the Bubble Vagrant box, run:
  22. ```shell script
  23. vagrant up
  24. ```
  25. To start the Bubble Vagrant box with some environment variables (for example):
  26. ```shell script
  27. LETSENCRYPT_EMAIL=someone@example.com BUBBLE_PORT=8080 vagrant up
  28. ```
  29. The first time `vagrant up` runs it will take a long time to complete, since it needs to
  30. download and build a lot of stuff. Depending on the speed of your computer and internet,
  31. it could take anywhere from 5 to 20 or more minutes.
  32. For future runs of `vagrant up`, startup times will be much faster.
  33. When the command completes, you'll have a Vagrant box with the Bubble source code and all
  34. dependencies fully built and ready to run a local launcher.
  35. # Stopping
  36. To stop the Vagrant box, run:
  37. ```shell script
  38. vagrant halt
  39. ```
  40. # Deleting
  41. To delete the Vagrant box, run:
  42. ```shell script
  43. vagrant destroy [-f]
  44. ```
  45. If you supply `-f` then you will not be asked for confirmation.
  46. # Logging In
  47. When your Vagrant box is ready, you can login to it:
  48. ```shell script
  49. vagrant ssh
  50. ```
  51. ## Developing
  52. You can develop directly on the Vagrant box by editing the source files in `${HOME}/bubble`, then
  53. building and running from there.
  54. Alternatively, you can develop locally on the host and periodically synchronize your source
  55. and/or build assets to the Vagrant box, where you then (maybe build and) run the Bubble API.
  56. The `/vagrant` directory on the Vagrant guest box is a shared folder. On the host side, it
  57. is the directory that the `Vagrantfile` is in (the top-level of the bubble repository).
  58. For various reasons, the Vagrant box does not build and work in this directory directly. Instead,
  59. when the box is created, `/vagrant` is copied to `${HOME}/bubble` and we run things from there.
  60. So, if you are doing development and building locally (on the host), and want to see
  61. your changes on the Vagrant box (guest), then copy your bubble jar from the host to the guest:
  62. ```shell script
  63. cp /vagrant/bubble-server/target/bubble-server-*.jar ${HOME}/bubble/bubble-server/target/
  64. ```
  65. To synchronize the entire directory (for example if you're editing sources on
  66. the host and building the jar on the guest):
  67. ```shell script
  68. rsync -avzc /vagrant/* /vagrant/.* ${HOME}/bubble/
  69. ```
  70. ## What's Next
  71. Read [Bubble Developer Tasks](dev_tasks.md) to understand how to keep the code
  72. up to date, run the API server, rebuild the jar, and more.
  73. If you've started the Bubble API already using `run.sh`, and want to launch a Bubble,
  74. continue with [activation](activation.md).