dokku - commands
chown -R dokku:dokku /home/dokku/<app>/DOKKU_FILES
chmod -R +r /home/dokku/<app>/DOKKU_FILES
# --------------------app
dokku create app1
dokku delete app1
dokku cleanup
#---------------------Info-------------------------
# see container that app using..
dokku ps <app>
docker ps -a --no-trunc
# list all running app
dokku list
# list all apps
dokku apps
#------------------------
#release old app & deploy new app = restart app, using
dokku release myapp
dokku deploy myapp
dokku rebuild myapp
docker restart `cat /home/dokku/myapp/CONTAINER`
#--------------------
### Run a command in the environment
# runs `ls -lah` in the `/app` directory of the application `node-js-app`
dokku run node-js-app ls -lah
dokku --rm-container run node-js-app ls -lah
dokku --rm run node-js-app ls -lah
### enter a running container.
# By default, it runs a /bin/bash
dokku enter node-js-app web
dokku enter node-js-app web.1
dokku enter node-js-app --container-id ID
# just echo hi
dokku enter node-js-app web echo hi
dokku enter node-js-app web python script/background-worker.py
#---------------------config------------------------
dokku config:set ruby-rails-sample DOKKU_SKIP_DEPLOY=true
# set multiple environment variables at once:
dokku config:set node-js-app ENV=prod COMPILE_ASSETS=1
dokku config:set --no-restart node-js-app ENV=prod
# keep `run` containers around
dokku config:set --global DOKKU_RM_CONTAINER=1
# revert the above setting and keep containers around
dokku config:unset --global DOKKU_RM_CONTAINER
# output variable in `eval`
eval $(dokku config node-js-app --export)
# output the variables in a single-line
dokku config node-js-app --shell
#_------------------------scale0-------------
dokku ps:scale node-js-app cron=1