-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5790b4d
commit ea14258
Showing
1 changed file
with
33 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
# dokku-toolbelt | ||
dokku-toolbelt | ||
============== | ||
|
||
Toolbelt for dokku, similar to the heroku toolbelt | ||
|
||
# Goals | ||
# Explanation | ||
|
||
Produce a heroku like toolbelt for dokku that is context aware and can easily be installed via | ||
popular package managers. | ||
Dokku toolbelt essentially just proxies running the `dokku` command on servers | ||
remotely via ssh with a little 'context aware sugar' supplied by running | ||
`git remote -v` in the current directory and parsing out `host` and `appname` | ||
|
||
Example: | ||
# Installation and basic usage | ||
``` | ||
npm install -g dokku-toolbelt | ||
|
@@ -23,7 +26,7 @@ ssh -T [email protected] config my-app | |
|
||
# Context aware | ||
|
||
Ideally the toolbelt should know from which directory you are in, which server and project you are working with. | ||
The toolbelt knows from which directory you are in, which server and project you are working with. | ||
It can determine this by using `git remote -v` and looking for the correct host by looking for a dokku@ username | ||
and parsing out the project name from the part after the : character. | ||
|
||
|
@@ -34,10 +37,29 @@ dokku [email protected]:my-awesome-project | |
# project -> my-awesome-project | ||
``` | ||
|
||
There may be quite a few edge cases to handle with this approach but this initial naive approach should work | ||
in a large majority of cases. | ||
# Usage | ||
|
||
The following are the commands that benefit from dokku-toolbelt knowing which | ||
app and server to run against. Other dokku commands mostly work as well. | ||
|
||
# Platforms | ||
Options: | ||
|
||
I would like to see an implementation on several popular package managers. I will personally be focusing on | ||
an implementation in node published to npm as that is the platform I am most familiar with. | ||
config Display the config vars for an app | ||
config:get KEY Display a config value for an app | ||
config:set KEY1=VALUE1 [KEY2=VALUE2 ...] Set one or more config vars | ||
config:unset KEY1 [KEY2 ...] Unset one or more config vars | ||
domains:add DOMAIN Add a custom domain to app | ||
domains List custom domains for app | ||
domains:clear Clear all custom domains for app | ||
domains:remove DOMAIN Remove a custom domain from app | ||
help Print the list of commands | ||
logs [-t] Show the last logs for an application (-t follows) | ||
nginx:build-config (Re)builds nginx config for given app | ||
nginx:import-ssl Imports a tarball from stdin; should contain server.crt and server.key | ||
ps:rebuild Rebuild an app | ||
ps:restart Restart app container(s) | ||
ps:start Start app container(s) | ||
ps:stop Stop app container(s) | ||
run <cmd> Run a command in the environment of an application | ||
url Show the first URL for an application (compatibility) | ||
urls Show all URLs for an application |