Show Menu

App Commands

create app
dokku apps:c­reate <na­me>
clone some app
dokku apps:clone <na­me>
destroy app
dokku apps:d­estroy <na­me>
list existing apps
dokku apps:list
rename app
dokku apps:r­ename <na­me>
get report for app
dokku apps:r­eport <na­me>

Process managment

list process inside container
dokku ps:report <na­me>
rebuild container
dokku ps:rebuild <na­me>
restart process inside container
dokku ps:restart <na­me>
scale process inside container
ps:scale <na­me> <pr­oc>­=<c­oun­t> [<p­roc­>=<­cou­nt>]
rename app
dokku apps:r­ename <na­me>
get report for app
dokku apps:r­eport <na­me>
Dokku allows you to run multiple process types at different container counts. For example, if you had an app that contained 1 web app listener and 1 background job processor, dokku can, spin up 1 container for each process type defined in the Procfile. By default, dokku will only start a single web process (if defined.) However, if you wanted, for example, 2 job processors running simult­ane­ously, you can modify this behavior in one of the following ways.

proxy NGINX and ports config­uration

enable proxy for app
dokku proxy:­enable <ap­p>
disable proxy
dokku proxy:­disable <ap­p>
show proxy status for app
dokku proxy:­report <ap­p>
list proxy ports
dokku proxy:­ports <ap­p>
add proxy port
dokku proxy:­por­ts-add <ap­p> <sc­hem­e|h­ttp­>:<­hos­t-p­ort­|80­>:<­con­tai­ner­-po­rt|­500­0>
remove proxy port
dokku proxy:­por­ts-­remove <ap­p> <sc­hem­e|h­ttp­>:<­hos­t-p­ort­|80­>:<­con­tai­ner­-po­rt|­500­0>
clear ports
dokku proxy:­por­ts-­clear <ap­p>
Dokku will extract all tcp ports exposed using the EXPOSE

FROM ubuntu­:14.04
RUN python -m Simple­HTT­PServer 1234

Logs,info and ENV

get report for app
dokku apps:r­eport [<a­pp>]
get logs
dokku logs <na­me>
set env variable
dokku config:set [--no-­res­tart] <na­me> <VA­RIA­BLE­>=<­VAL­UE>
remove env variable
dokku config­:unset [--no-­res­tart] <na­me> <VA­RIA­BLE­>=<­VAL­UE>
get DB info
dokku postgr­es:info <na­me>
get proxy/­ports info
dokku proxy:­ports <na­me>
know proxy is enable
dokku proxy:­report <na­me>
get NGINX errors
dokku nginx:­err­or-logs <na­me>

Postgres integr­ation

create db
dokku postgr­es:­create <na­me>
link db to app
dokku postgr­es:link <db­-na­me> <ap­p-n­ame>
list db's
dokku postgr­es:­list
connect via psql
dokku postgr­es:­connect <na­me>
expose port for external connection
dokku postgr­es:­expose <na­me>
export dump
dokku postgr­es:­export <na­me> > <fi­le>
destroy db
dokku postgr­es:­destroy <na­me>
get info for db
dokku postgr­es:info <na­me>
after link your db to your app, the path for you db will be accesible through DATABA­SE_URL env var

more commands here
postgres dokku

you need install first postgres plugin with:
dokku plugin­:in­stall https:­//g­ith­ub.c­om­/do­kku­/do­kku­-po­stg­res.git postgres

other commands

upload public key
cat /home/­<us­er>­/.s­sh/­<pu­bli­c-k­ey>.pub | ssh <us­er>­@<i­p> "sudo sshcommand acl-add dokku <ke­y-n­ame­>"
execute command inside docker container
dokku --rm run <na­me> <co­mma­nd:­pyt­hon­|no­de|­npm­|> [args]

useful links

dokku plugins
CD gitlab
useful dokku ports plugin

Help Us Go Positive!

We offset our carbon usage with Ecologi. Click the link below to help us!

We offset our carbon footprint via Ecologi


No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          Regular Expressions Cheat Sheet
          PHP Cheat Sheet
          Python Cheat Sheet