Skip to content

Instantly share code, notes, and snippets.

View bradbajuz's full-sized avatar

Brad Ballard bradbajuz

View GitHub Profile
@bradbajuz
bradbajuz / part-1-rolling-your-own-heroku-with-dokku.md
Last active March 12, 2019 15:48
part-1-rolling-your-own-heroku-with-dokku

Setting up Heroku like deployment is pretty easy. There are lot of reasons why to do this but a big one specifically is cost. Heroku is expensive compared to a $20 DigitalOcean droplet. Of course, learning how to be a system administrator is required but not at all difficult.

In this series of how-to's, we'll be starting off deploying a Ruby on Rails app using a DigitalOcean droplet, Ubuntu, Docker and Dokku all for $5 a month that can easily be scaled to $20 a month (recommended for production apps).

Setup a Droplet

  1. Don't have a DigitalOcean account, create one.

  2. Create a droplet:

  3. Select the One-click Apps tab:

  • Choose an image - Dokku 0.7.2 on 16.04
@bradbajuz
bradbajuz / setup_dokku_app.sh
Created January 19, 2017 15:09
Setup Dokku App Script
#!/bin/bash
# init
function pause(){
read -p "Press [Enter] to continue . . ."
echo
}
printf "\e[1;31mCreate app: dokku apps:create appname\033[0m\n"
pause
dokku apps:create appname
pause
@bradbajuz
bradbajuz / Cheat Sheet
Last active February 2, 2021 13:10
Git, Rails and VIM Cheat Sheet
GIT COMMANDS
First Commit
$ git init
$ git add .
$ git commit -m "Initial commit"
$ git remote add origin [git address]
$ git push -u origin master
Branches
$ git checkout -b [name of branch]