Skip to content

Instantly share code, notes, and snippets.

@bbody
Last active January 12, 2019 14:20
Show Gist options
  • Save bbody/67b557863b781d749382a23592840f8b to your computer and use it in GitHub Desktop.
Save bbody/67b557863b781d749382a23592840f8b to your computer and use it in GitHub Desktop.
Setting up a Rails site on Dokku
APP_NAME=$1 # "app_name"
URL=$2 # "appname.example.com"
RAILS_BUILDPACK="https://github.com/heroku/heroku-buildpack-ruby.git#v142"
dokku apps:create $APP_NAME
dokku config:set $APP_NAME BUILDPACK_URL=$RAILS_BUILDPACK
# Assumes PostGres sudo dokku plugin:install https://github.com/dokku/dokku-postgres.git if not installed already
dokku postgres:create $APP_NAME
dokku postgres:link $APP_NAME $APP_NAME
dokku domains:add $APP_NAME $URL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment