I use dokku a for most deployments and while their cli is pretty extensive a certain set of operations could be better in terms of creating an App.
There's always predefined steps for various apps and hence I'd like to have a cli that can act as a wrapper around dokku to make it easier for me to create apps.
- Create a New App
- Enter app name
- Select database plugin
- link database to app
- Add domain to the app
- Add Let's encrypt
- Delete App
- Unlink all the above
- clean up un-used images
- Cli for creation and deletion of app
- Lightweight Web-UI for the same
Download the binary from releases from the browser or using curl
# For linux / unix, make sure wget is installed
curl -s https://api.github.com/repos/barelyhuman/dokcli/releases/latest | grep browser_download_url | grep linux-amd64 | cut -d '"' -f 4 | wget -qi -
tar -xvzf dokcli-linux-amd64.tar.gz
copy it to /usr/local/bin
and make sure it's added to your PATH
cp dokcli /usr/local/bin
export PATH=$PATH:/usr/local/bin
Note: Make sure you have dokku installed
For now the cli just creates a script for you to setup a dokku as needed.
(Step 0 is optional), the cli will ask you the needed information.
-
Create a yml file named
dokku-gen.yml
. You can use the provided template dokku-gen.template.yml -
Run
dokcli
on the system to create the app on. -
A script with the app name will be generated for you (screenshot below) with the name of
dokku-setup-<app-name>.sh
-
chmod +x ./dokku-setup-<app-name>.sh
-
./dokku-setup-<app-name>.sh
to run the generated script.
Example of a generated script
Make sure you have a minimum of go 1.5
Run
go run .
Build
go build .
Check the issues for things you can pick up and send through a PR for