Useful Dokku Commands

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

Create App

1
dokku apps:create <app-name>

Database

1
2
3
4
5
sudo dokku plugin:install https://github.com/dokku/dokku-postgres.git

dokku postgres:create <db-name>

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

Logs

1
2
3
dokku logs <app-name>

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

SSL

1
2
3
4
5
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>

Process Management

Restart

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

Deploy

1
2
3
4
5
6
7
git remote add dokku dokku@<host>:<app-name>

git push dokku master

or

git push dokku <local-branch>:master