GithubHelp home page GithubHelp logo

dokkupy's Introduction

dokkupy - Python API and script for dokku

Install :

pip install git+https://github.com/fenrrir/dokkupy.git

Requires :

'GitPython==2.1.0'

Debugging :

export DOKKUPY_DEBUG=1

Features

  • API for apps
    • list
    • create
    • exists
    • is_running
    • start
    • stop
    • restart
    • destroy
    • get_config
    • set_config
    • del_config
    • scale
  • API for addons/plugins
    • list
    • create
    • exists
    • is_running
    • start
    • stop
    • restart
    • clone
    • destroy
    • link
    • unlink
    • links

Examples

Stopping a application :

dokku = dokkupy.Dokku('[email protected]')
apps = list(dokku)
first_app = apps[0]
first_app.stop()

Creating a postgres database :

dokku = dokkupy.Dokku('[email protected]')
postgres = dokku.get_service('postgres')
if postgres:  # is available?
    mydb = postgres['mydb']
    if mydb: # database exists
        mydb.destroy()
    mydb.create()
    mydb.link(first_app)

Deploying with cli :

$ cat config-example.json
{
  "services": [
    {
      "name": "postgres",
      "destroy_on_remove": true
    }
  ],
  "environ": {
    "key": "secret"
  },
  "scale": {
    "worker": 1
}
$ cd <project path>
$ dokkupycli --project-name mydeploy --config config-example.json --address [email protected] create

dokkupy's People

Contributors

fenrrir avatar valbertovc avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.