DokkuClient
DokkuClient is solution for people who don't want to type every time something like
$ ssh -t dokku@my_host.com command app_name command
but just do
$ dokku command
This gem has built in commands for these plugins:
Installation
Install it yourself as:
$ gem install dokku_client
Configuration
$ dokku (for the first time in project)
$ dokku reconfig (to update config)
You will be asked for your dokku host and project name which will be stored in your application .git/config
Customize list of available commands
In 'active commands' question when you configuring dokku client type plugin name separated by comma and commands for this plugin will be visible in dokku help. Available plugins:
- memcached
- postgresl
- mongodb
- redis
Common and Config commands are enabled by default. If you want all commands to be visible you need to type 'all' in the question.
Show help
dokku help
or
dokku --help
Available commands (aliases to commands in brackets)
dokku
Common commands:
logs (l) show app logs
run (r) <command> run command (unfortunately fon now you have to type command in quotes)
url (u) show link to aplication
plugins (p) show installed plugins on dokku host
rc <env> run rails console for application (pass 'staging' to load staging console, or leave empty for production)
rdm run database migrations
Config commands:
config (c) show environment variables for project
config:get (gc) <KEY> show exact environment variable
config:set (sc) KEY=VALUE [KEY2=VALUE2] set new environment variables
config:unset (uc) KEY [KEY2] remove environment variables
Memcached commands:
memcached:create create memcached container
memcached:delete delete memcached container
memcached:info display container informations
memcached:logs display last logs from memcached container
memcached:link <container> link an app to memcached container
MongoDB commands:
mongodb:create create a mongo database
mongodb:delete delete a mongo database
mongodb:console lunch mongodb console as admin
mongodb:link link mongo container to application
mongodb:logs display logs for mongo container
mongodb:list list all mongo databases
mongodb:status display status of mongo container
Postgresql commands:
postgresql:create <db> create a postgresql database
postgresql:delete <db> delete specified postgresql database
postgresql:info <db> display database information
postgresql:link <db> link an app to a postgresql container
postgresql:list <db> display list of postgresql containers
postgresql:logs display last logs from postgresql container
Redis commands:
redis:create create a redis container
redis:delete delete redis container
redis:info display container informations
redis:link <container> link an app to a redis container
redis:logs display last logs from redis container
Mysql commands:
mysql:create create a mysql container
mysql:delete delete mysql container
mysql:info display container informations
mysql:link <container> link an app to a mysql container
mysql:logs display last logs from mysql container
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Thanks
This gem is inspired by https://github.com/lubieniebieski/pivo_flow. Thanks to it's author for the inspiration and idea.