blog.rajivm.com/your-own-mini-heroku-for-5-dollars-per-month.html

Dokku is a lightweight PaaS solution that let's you essentially have a mini self-hosted Heroku. This means you can easily take a web application (Django, Rails, etc.) and deploy it with little to no setup. While Heroku offers scalability and support, it does so at a significant cost ($) beyond a very low volume; if you're planning to deploy lots of small or in-development apps, then you don't necessarily need everything Heroku offers, you just need an easy way to (git) push your apps out there. I'm going to walk through the setup of Dokku and then demonstrate how to deploy a Django app with a PostgreSQL database (however, the instructions can be easily re-applied to other frameworks, like Rails). Initial Dokku Setup We can host Dokku on almost any VM or Dedicated Hosting provider (or even your own machine). I went with DigitalOcean which offers a small instance for only $5/month (and can easily be grown as needed); other great options are Linode (which I also use), and EC2. Not doing any advance reading about it's requirements, I first tried to set it up on an existing 32bit VM, and then again an Ubuntu 12.10 64bit VM. Unfortunately, I came to the late realization that Docker, the lxc-based container solution that Dokku is built atop, is only compatible with 64bit Linux, and only runs stable on kernel versions greater than 3.8 (Ubuntu 12.10 comes with 3.2, 12.04 is easily upgradable to 3.8). Eventually, I went with the Dokku's preferred target OS of Ubuntu 13.04 x64. After this point, setup was trivial: wget -qO - https://raw.github.com/progrium/dokku/v0.2.0/bootstrap.sh | sudo DOKKU_TAG=v0.2.0 bash After the bootstrapping has run, you'll want to register your SSH public key with Dokku (USERNAME in this case is an arbitrary identifier for your key) so you're able to push your apps up; from your machine: cat ~/.ssh/id_rsa.pub | ssh yourserver.com


Comments (0)

Sign in to post comments.