28/05/2020

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>

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

Have something you want me to write about or have a comment on one of my posts? You can send an email to ahoy@barelyhuman.dev