Skip to main content

Heroku-like command line interface for Dokku

Note: This project is in the very early stages of development. You can help by adding commands (see below).

https://badge.fury.io/py/dokku-client.png https://pypip.in/d/dokku-client/badge.png

Installation

pip install dokku-client

Configuration

You can specify the Dokku host & app on the command line, but you may find it convenient to set the following environment variables instead:

export DOKKU_HOST=ubuntu@myserver.com
export DOKKU_APP=my-app-name

Setting these variables in your virtualenv’s postactivate hook may be useful.

Usage

Once installed, usage is simple:

dokku-client help

Produces:

Client for Dokku

usage:
    dokku-client <command> [<args>...]
    dokku-client help

global options:
    -H <host>, --host=<host>      Host address
    -a <app>, --app=<app>         App name

full list of available commands:

    help       Show this help message
    configget  Set one or more config options
    configset  Set one or more config options in the app's ENV file
    prompt     Open a prompt
    restart    Restart the container

See 'git help <command>' for more information on a specific command.

Contributing new commands

Dokku-client allows any developer to hook in extra commands. This is done using exactly the same mechanism that dokku-client uses internally, that of entry points provided by setuptools.

First, create a python package. You may have your own favorite way of doing this, but I use seed:

mkdir dokku-client-mycommand
cd dokku-client-mycommand
pip install seed
seed create
ls

Second, create a class which extends dokku_client.BaseCommand and implements the method main(args). Also, the doc-block at the top of the class will be used by docopt to parse any command line arguments, so make sure you include that. See the prompt command for an example.

And third, in your new setup.py file, specify your new class as an entry point:

entry_points={
    'dokku_client.commands': [
        'mycommand = dokku_client_mycommand.mycommand:MyCommand',
    ],
}

Run setup.py so that the new entry point is initialized:

# Run in develop mode, so files will not be copied away.
# You can continue to edit your code as usual
python setup.py develop

You should now find that your new command is available in dokku-client, run dokku-client help to check.

Once done, you can release your package to PyPi using seed release --initial.

Metadata

Release files for dokku-client 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dokku-client 0.2.3
File Size Uploaded
dokku-client-0.2.3.tar.gz 6.7 kB Details

Release files / dokku-client-0.2.3.tar.gz

Download URL dokku-client-0.2.3.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f3456c5329fa54dcb294d117f50b3a7ae8d1a8ecaa228a4178c18c3ad98c197e
BLAKE2b-256 checksum
How to use checksums
d212fde068e572e8ca1beef8add599af53c1cc2c6bc470ad1dcc7455ef90429c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2.3 This release

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page