I’m tired of having to pay a premium to keep more than one process alive. Dynos are done. DONE!
It’s time for something new. That new thing is Dokku. It’s the same workflow you are most likely used to:
git push to deploy. Follow this tutorial. In a nutshell you:
- Launch a droplet (cloudspeak for VPS)
- Configure your SSH key to push to the box
- Setup PostgreSQL
- Deploy your app via
Great! But your app might need more than just a database, unicorn, and nginx. Here’s a few helpful notes while you’re moving an app onto Dokku/DO:
Enable backups on the droplet
This increases the price a little. Peace of mind is worth it.
Bring in memcached
Another bonus: it’s free! Just install dokku-memcached and you’re set.
Need a www redirect?
You might hate
www subdomains too. Redirect them with dokku-redirects.
How do you find your logs? They’re in a docker container, so it’s not fully obvious how to find them. Dokku provides a way to get them, though:
ssh firstname.lastname@example.org dokku logs yourappname
If you want to poke around the filesystem for other reasons, or run commands:
ssh email@example.com dokku run yourappname bash
I’m sure these could be aliases too you could set up per app. This is begging to be a gem.
Right now, I don’t have my dokku setup to restart when the box restarts. This sucks, but there’s a dokku-supervisord plugin for dealing with this.
You’re a sysadmin again
Obviously, that was the premium you were paying. However, I don’t mind it that much. Plus, docker/dokku has been pretty fun and enjoyable to work with, and you still get that sweet
git push experience.
If this helped you out, I’d appreciate if you signed up for DigitalOcean with my referral link. Thanks.