July 15, 2015

Running BaasBox 0.9.4 on Ubuntu 14.04

This is a simple guide to getting BaasBox up and running on Ubuntu. I’m running it on a vps on digital ocean. Right now this is purely for a dev environment and you shouldn’t expect to use the setup for a production site.

First we get our dependencies installed:

# Install Java, Supervisor, and unzip
sudo add-apt-repository ppa:webupd8team/java -y
sudo apt-get update
sudo apt-get install oracle-java8-installer unzip supervisor

Next setup an account to run BaasBox

# Add baasbox user and set up directories
sudo adduser baasbox
sudo -u baasbox
sudo mkdir -p /opt/baasbox
sudo mkdir -p /var/log/baasbox

We’ll download the latest verison (0.9.4) of BaasBox and symlink it which will be helpful for later upgrades.

# Download Baasbox
cd /opt
wget --content-disposition http://www.baasbox.com/download/baasbox-stable.zip
unzip baasbox-stable.zip
sudo chown -R baasbox /var/log/baasbox /opt/baasbox-*
ln -s baasbox-0.9.4 baasbox

We’re going to make a couple small changes to the default start script. This will allow us to use a config file for our server and application options, it will also allow us to run BaasBox as a daemon in the next step. Replace /opt/baasbox/start with the following script:

https://gist.github.com/savagegus/92ab28f7c41974411dfb.js?file=start.sh

Finally create the server config file at /opt/baasbox/baasbox.conf

https://gist.github.com/savagegus/92ab28f7c41974411dfb.js?file=baasbox.conf

We’ll use supervisord, which we installed in the first step to run BaasBox as a service. Supervisord will be responsible for automatically running BaasBox if the process dies or if the machine is rebooted.

# Set up supervisor
service supervisor restart

Create a config file in /etc/supervisor/conf.d/baasbox.conf

https://gist.github.com/savagegus/92ab28f7c41974411dfb.js?file=supervisord-baasbox.conf

Now you should be up and running with BaasBox on port 9000. Remember this is only acceptable for development and please replace the default appcode and admin password.


3d blog Note



Previous post
Swift Playgrounds and 3rd Party Dependencies Recently, I have been teaching myself swift and exploring 3rd party libraries. It seemed like playgrounds would be the natural way to do this, but
Next post
Does anyone have experience with running eero’s for their home wifi?