Reaper
Minimalist | Developer | Designer

Useful Dokku Commands

A micro post for commands that I usually look for, while using dokku.

Create App

dokku apps:create <app-name>

Database

sudo dokku plugin:install https://github.com/dokku/dokku-postgres.git

dokku postgres:create <db-name>

dokku postgres:link <db-name> <app-name>

Logs

dokku logs <app-name>

dokku logs <app-name> -t #to tail the logs

SSL

sudo dokku plugin:install https://github.com/dokku/dokku-letsencrypt.git

dokku config:set --no-restart <app-name> DOKKU_LETSENCRYPT_EMAIL=<email>

dokku letsencrypt <app-name>

Domain

dokku domains:add <app-name> <domain>

Process Management

Restart

dokku ps:restartall
dokku ps:restart <app-name>
### Rebuild from source
dokku ps:rebuildall
dokku ps:rebuild <app-nam>

Deploy

git remote add dokku dokku@<host>:<app-name>

git push dokku master

or

git push dokku <local-branch>:master

You can also subscribe to my Newsletter or RSS if you'd like to receive such posts in your inbox.