TL;DR: Nanobox is free but requires paid service on DigitalOcean or AWS, so I deployed to Heroku.
I wanted to use something other than Heroku but after all it’s still the best free platform for small web applications. I spent about 2 hours setting up Nanobox Desktop just to discover that it will create Amazon EC2 instance of $6/month cost (Nanobox itself is free for open source apps) when I connected AWS as cloud provider, which I could do on the beginning. I don’t need 100% uptime or advanced managing, monitoring and scaling features for that small application, good old Heroku will be just fine and quick. There is AWS Free Tier for 12 months but I expect some longer fiddling on the first time, I might try it later for other projects.
In this post I will present some steps done with Nanobox.
Installing Nanobox Desktop
After creating Nanobox account I had to install Nanobox Desktop to start development.
I finished installation with
nanobox command to create initial configuration with settings like: what VM to run Nanobox with (VirtualBox or Docker Native), how many CPU cores and GB of RAM make available to the VM. Configuration ended with strange message about
docker-machine and link to docs.
The documentation page I visited explained that
vboxmanage is a management command for VirtualBox which I needed to install separately. After this I repeated the configuration process for Nanobox.
Sinatra from scratch
On Get Started page there are guides for most popular languages and frameworks. I went for Ruby and Sinatra. By following this guide I created base application and configuration. All changes were included in this commit. Next step was to install Sinatra and other dependencies (
nanobox run is to execute given command inside container’s environment and must be run inside project directory like other
After a bit longer moment it was done – it had to build and prepare VM container for the first time before actually installing any dependencies.
With these commands I was able to run local server and access it under
nanobox dns add local sinatra.dev
nanobox run rackup --host 0.0.0.0