diff --git a/.vagrant/rgloader/loader.rb b/.vagrant/rgloader/loader.rb deleted file mode 100644 index c3c05b09..00000000 --- a/.vagrant/rgloader/loader.rb +++ /dev/null @@ -1,9 +0,0 @@ -# This file loads the proper rgloader/loader.rb file that comes packaged -# with Vagrant so that encoded files can properly run with Vagrant. - -if ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"] - require File.expand_path( - "rgloader/loader", ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"]) -else - raise "Encoded files can't be read outside of the Vagrant installer." -end diff --git a/Vagrantfile b/Vagrantfile index 742ad407..93a63256 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -13,6 +13,7 @@ # - the code is in ${HOME}/bubble # - API environment file is ${HOME}/.bubble.env # - start the API server (local launcher) with run.sh +# - access the webapp at http://127.0.0.1:${BUBBLE_PORT}/ # # There are a few environment variables that determine how the box is initialized, # described below. @@ -36,7 +37,7 @@ Vagrant.configure("2") do |config| # Forward ports port = ENV['BUBBLE_PORT'] || 8090 - config.vm.network "forwarded_port", guest: port, host: port + config.vm.network "forwarded_port", guest: port, host: port, host: '127.0.0.1' # Update system config.vm.provision :shell do |s| @@ -93,10 +94,11 @@ Vagrant.configure("2") do |config| vagrant ssh - Once logged in: + Once you are logged in: - the code is in ${HOME}/bubble - API environment file is ${HOME}/.bubble.env - start the API server (local launcher) with run.sh + - access the webapp at http://127.0.0.1:${BUBBLE_PORT}/ Enjoy! ================================================================== diff --git a/bin/run.sh b/bin/run.sh index 38c549a4..d7567d71 100755 --- a/bin/run.sh +++ b/bin/run.sh @@ -16,11 +16,13 @@ # # Environment variables # -# BUBBLE_ENV : env file to load, used when performing handlebars substitutions on entities marked -# with `"_subst": true` JSON attribute. Default is ~/.bubble.env -# BUBBLE_JVM_OPTS : Java options. Defaults to either "-Xmx512m -Xms512m" when no command is set, else "-Xmx64m -Xms2m" -# BUBBLE_JAR : location of bubble uberjar. Default is to assume there is exactly one bubble-server*.jar file in a -# directory named "target" that is in the same directory as this script +# BUBBLE_LISTEN_ALL : if set to true and running a Bubble server, listen on all addresses (bind to 0.0.0.0) +# if not set, server will only listen on 127.0.0.1 +# BUBBLE_ENV : env file to load, used when performing handlebars substitutions on entities marked +# with `"_subst": true` JSON attribute. Default is ~/.bubble.env +# BUBBLE_JVM_OPTS : Java options. Defaults to either "-Xmx512m -Xms512m" when no command is set, else "-Xmx64m -Xms2m" +# BUBBLE_JAR : location of bubble uberjar. Default is to assume there is exactly one bubble-server*.jar file in a +# directory named "target" that is in the same directory as this script # # Environment variables for API commands # @@ -162,7 +164,12 @@ if [[ -z "${BUBBLE_PASS}" ]] ; then BUBBLE_PASS=password fi +LISTEN_ALL="" +if [[ -n "${BUBBLE_LISTEN_ALL}" && "${BUBBLE_LISTEN_ALL}" == "true" ]] ; then + LISTEN_ALL="-Dbubble.listenAll=true" +fi + # Run! BUBBLE_JAR="${BUBBLE_JAR}" java ${LOG_CONFIG} ${BUBBLE_JVM_OPTS} \ -Xlog:class+load=info:/tmp/bubble_classes_$(date +%s).txt \ - ${debug} -server -cp "${BUBBLE_CP}" ${CLASS} ${command} "${@}" + ${debug} -server -cp "${BUBBLE_CP}" ${LISTEN_ALL} ${CLASS} ${command} "${@}" diff --git a/bubble-web b/bubble-web index e02f50bf..47107ba2 160000 --- a/bubble-web +++ b/bubble-web @@ -1 +1 @@ -Subproject commit e02f50bf55ae38cb81846adab9904d59db6f0255 +Subproject commit 47107ba29d696e3433980e6538a96c1884b29f3a