Dokku & DigitalOcean

I’ve just got round to exploring Dokku. It seems these days all I need to do is type <name of cool nerdy thing> digitalocean into Google, and invariably I am greeted with a plethora of handy, in depth tutorials that tell me how to install, configure, scale and secure it.

All of these one click installs, while incredibly convenient, are certainly eating into my money for food. But who needs sustenance when you’ve got a fully container-based Platform for deploying self-contained apps?

Not me.

Something I’m looking at more and more is the Devops side of things. I think it’s really important to fully understand your environment when you’re developing anything server side, and especially as those apps need to scale, or involve seperate moving parts like realtime, queuing and all that.

For me, the holy grail is to have a versioned application (which I generally host on a private Github account), which I can easily track, branch when I’m developing new features and roll back if I make a mistake. Which has happened to me at most once in my entire life.

So, while I was picking through the available “plug and play” containers on DigitalOcean, I saw Dokku and read into it a bit. It seems to fit the bill exactly. Let me tell you a bit about it.

See the DigitalOcean Tutorial

The way Dokku works is in many ways similar to the way Heroku works. You create your app in your development environment, ensure its versioned with Git, and push any changes to them. They then run some magical script that detects the kind of app, be it Node.js, Ruby, PHP, etc. Once it figures that out it will then go ahead and create a container for you.

The glory of this is that I can run a reasonably beefy container that could in theory run an unlimited number of apps, all completely self contained and all versioned in the same way any Git based project is.

Setup was so easy I had to check I did I correctly, simply create a new droplet on DigitalOcean, select the Dokku image, add my SSH key, then when it’s finished provisioning go to the new IP address - and step through the simple setup process. I decided to go for the hostname based route, so all new apps are set up with the following container pattern:

myapp.mydomain.com

I host my DNS using Amazon’s Route 53, so it was as simple as creating a wildcard record for the domain and setting it to the IP address for the server.

Have a play!

 
1
Kudos
 
1
Kudos

Now read this

Building a voice app with Node, Twilio, Compose and Heroku - Part 1

I’m challenging myself today. My hangover Saturday. It’s just no good sitting around in my dressing gown watching the same Simpsons episodes I did when I was hungover last week. It just doesn’t warm the soul. My challenge was to use some... Continue →