{ "info": { "author": "PraiseBeToScience", "author_email": "pbts.reddit@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Framework :: Flask", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3 :: Only", "Topic :: Utilities" ], "description": "dockerhub-webhook\n=================\n.. image:: https://img.shields.io/pypi/v/dockerhub-webhook.svg\n :alt: PyPi version\n :target: https://pypi.python.org/pypi?:action=display&name=dockerhub-webhook&version=0.2.1\n.. image:: https://travis-ci.org/Praisebetoscience/dockerhub-webhook.svg?branch=master\n :alt: Travis CI Status\n :target: https://travis-ci.org/Praisebetoscience/dockerhub-webhook\n.. image:: https://coveralls.io/repos/github/Praisebetoscience/dockerhub-webhook/badge.svg?branch=master\n :alt: Coveralls Coverage\n :target: https://coveralls.io/github/Praisebetoscience/dockerhub-webhook?branch=master\n.. image:: https://codeclimate.com/github/Praisebetoscience/dockerhub-webhook/badges/gpa.svg\n :alt: Code Climate Rating\n :target: https://codeclimate.com/github/Praisebetoscience/dockerhub-webhook\n.. image:: https://requires.io/github/Praisebetoscience/dockerhub-webhook/requirements.svg?branch=master\n :alt: Requires.io Check\n :target: https://requires.io/github/Praisebetoscience/dockerhub-webhook/requirements/?branch=master\n\n\n**dockerhub-webhook** listens to HTTP POST requests from dockerhub and\ntriggers your scripts to update when a new container is available.\n\n.. _Features:\n\nFeatures\n--------\n\n- Python 3.3+ support.\n- Pip installion availble\n- Lightweight - built using `Flask`_.\n- Supports unlimited number of triggers.\n- Full logging support including script errors.\n\n--------------\n\n.. _installation:\n\nInstallation (Option 1: from Git)\n---------------------------------\n\nDockerhub-webhook is supported on python 3.3, 3.4, 3.5, and 3.6. To install\nfrom the github repository, the first step is to clone it.\n\n.. code-block:: bash\n\n git clone https://github.com/Praisebetoscience/dockerhub-webhook.git\n\nThen install dependencies.\n\n.. code-block:: bash\n\n pip install -r requirements.txt\n\nNext we need to create the config file which contains our apikey, maps scripts\nto incoming repository hooks. We can start from the example config.py and\nfilling in the variables listed.\n\n.. code-block:: bash\n\n cp config.py.example config.py\n\nTo generate an apikey you can use tools such as openssl or pwgen.\n\n.. code-block:: bash\n\n openssl rand -base64 30 | sed 's=/=\\\\/=g'\n pwgen 30 1\n\nAlternatively you can set the ``$DOCKERHOOK_TOKEN`` environment variable with your\nkey. This will override anything in config.py.\n\nThe ``HOOKS`` dict in config.py maps respository names to serverside deploy\nscripts. Keys are the names of repositories (no namespace), and values are\nthe full path to the script to be called, or a relative path to the current\nworking directory.\n\n.. code-block:: python\n\n HOOKS = {'repo1': '/full/path/to/script.sh',\n 'repo2': 'relative_path_to_script.sh'\n }\n\n\nWSGI server (ex `Gunicorn`_)\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nIt is *highly* recommened you install a production ready WSGI server and\nnot use the server packaged with Flask (Werkzeug) because it\u2019s geared\ntowards development. Here\u2019s a quick example of how to start the\napplication with Gunicorn. Gunicorn is typically reversed proxied by\nnginx.\n\n**NOTE**: dockerhub-webhook looks for ``config.py`` in the current\nworking directory.\n\n.. code-block:: bash\n\n pip install gunicorn\n gunicorn dockerhook:app -w 1 -b :\n\n\nInstallation (Option 2: pip)\n----------------------------\n\nThe biggest devation from installing from github is the directory stucture\nwhere the config file, logs, and optionally scripts needs to be created\n\n.. code-block:: bash\n\n mkdir -p dockerhook/log\n mkdir -p dockerhook/scripts\n\nYou create your config file just as above, but instead of coming with the\nsource, you have to download the example directly.\n\n.. code-block:: bash\n\n cd dockerhook\n wget -o config.py https://raw.githubusercontent.com/Praisebetoscience/dockerhub-webhook/master/config.py.example\n\nInstall using pip\n\n.. code-block:: bash\n\n pip install dockerhub-webhook\n\n\n.. _DockerHubSetup:\n\nConfigure `Docker Hub`_\n~~~~~~~~~~~~~~~~~~~~~~~\n\n#. Go to https://hub.docker.com\n#. Click the repository you wish to autodeploy\n#. Under the Webhooks tab add a webhook\n#. Choose any name you please\n#. For the Webhook URL use the following:\n\n.. code-block:: bash\n\n http://example.com/hubhook?key=secret\n\nAdjust the domain and endpoint to your reverse proxy setting, and replace\n``secret`` with your API key.\n\n.. _license:\n\nLicense\n~~~~~~~\n\ndockerhub-webhook source code is provided under the `Apachi 2.0 License\n`_.\n\n* Copyright (c), 2017, PrasieBeToScience.\n\n.. _development:\n\nDevelopment\n~~~~~~~~~~~\n\nWebhook uses `github-flow`_ for managing branches and follows `PEP8`_ as much as\npossible.\n\nTo start Flask's development Werkzeug server you can use ``run.py``.\n\nYou can run pytest unittests using ``python setup.py test``.\n\n\n\n.. _PEP8: https://www.python.org/dev/peps/pep-0008/\n.. _github-flow: https://guides.github.com/introduction/flow/\n.. _Flask: http://flask.pocoo.org/\n.. _Gunicorn: http://gunicorn.org/\n.. _Docker Hub: https://hub.docker.com/", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Praisebetoscience/dockerhub-webhook", "keywords": "dockerhub webhook handler", "license": "Apache License 2.0", "maintainer": "", "maintainer_email": "", "name": "dockerhub-webhook", "package_url": "https://pypi.org/project/dockerhub-webhook/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/dockerhub-webhook/", "project_urls": { "Homepage": "https://github.com/Praisebetoscience/dockerhub-webhook" }, "release_url": "https://pypi.org/project/dockerhub-webhook/0.2.1/", "requires_dist": null, "requires_python": "", "summary": "Webhook handler for dockerhub autodeployments", "version": "0.2.1" }, "last_serial": 2608985, "releases": { "0.2.0.dev0": [ { "comment_text": "", "digests": { "md5": "f811c9ada2f4e3b1c455076b75595e0a", "sha256": "ebebb82dbf6990f7580ee3c42066942be5d5209f3a4c3bc65693eb2840e728d5" }, "downloads": -1, "filename": "dockerhub_webhook-0.2.0.dev0-py3-none-any.whl", "has_sig": false, "md5_digest": "f811c9ada2f4e3b1c455076b75595e0a", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 9128, "upload_time": "2017-01-31T04:56:11", "url": "https://files.pythonhosted.org/packages/d1/24/9b6e9fdbb0784d3f6cb4feb64219be96ba3f5be4a322d30dfa94dc78ffc8/dockerhub_webhook-0.2.0.dev0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2356981dbc476dea902b68de72838fb4", "sha256": "84171980c34b6176bb9addb748a3a572fc91afecdd21484a8bff6bd02ca34dcc" }, "downloads": -1, "filename": "dockerhub-webhook-0.2.0.dev0.tar.gz", "has_sig": false, "md5_digest": "2356981dbc476dea902b68de72838fb4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5992, "upload_time": "2017-01-31T04:56:08", "url": "https://files.pythonhosted.org/packages/0c/5b/39ab98004a429c33ffa36899a71644936f98de9f7a92c0fe544b3fe5878d/dockerhub-webhook-0.2.0.dev0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "328e48988f4190c6f3f86d2c2cd6a229", "sha256": "7627a4cc3d0f40274c26bdb7bfd5147117598bdbd851acbb0dff4b395ff60fa3" }, "downloads": -1, "filename": "dockerhub_webhook-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "328e48988f4190c6f3f86d2c2cd6a229", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 9738, "upload_time": "2017-01-31T11:15:48", "url": "https://files.pythonhosted.org/packages/7f/e9/fd3fb6b453b7a3819ba36b903b4390bbefab603f5b17b4ee08c84c415ba5/dockerhub_webhook-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8fbd110d9977e5fd6e50ad31007741d4", "sha256": "76d7f0e886e7fd22a593b3955e8bcd50d06ecebd8a83b3ea2bfb4afedf5c01d0" }, "downloads": -1, "filename": "dockerhub-webhook-0.2.1.tar.gz", "has_sig": false, "md5_digest": "8fbd110d9977e5fd6e50ad31007741d4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6780, "upload_time": "2017-01-31T11:15:46", "url": "https://files.pythonhosted.org/packages/3c/0a/517489db4182a961c996ac31223f029e9276fd11328e247121a8d955aaf9/dockerhub-webhook-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "328e48988f4190c6f3f86d2c2cd6a229", "sha256": "7627a4cc3d0f40274c26bdb7bfd5147117598bdbd851acbb0dff4b395ff60fa3" }, "downloads": -1, "filename": "dockerhub_webhook-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "328e48988f4190c6f3f86d2c2cd6a229", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 9738, "upload_time": "2017-01-31T11:15:48", "url": "https://files.pythonhosted.org/packages/7f/e9/fd3fb6b453b7a3819ba36b903b4390bbefab603f5b17b4ee08c84c415ba5/dockerhub_webhook-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8fbd110d9977e5fd6e50ad31007741d4", "sha256": "76d7f0e886e7fd22a593b3955e8bcd50d06ecebd8a83b3ea2bfb4afedf5c01d0" }, "downloads": -1, "filename": "dockerhub-webhook-0.2.1.tar.gz", "has_sig": false, "md5_digest": "8fbd110d9977e5fd6e50ad31007741d4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6780, "upload_time": "2017-01-31T11:15:46", "url": "https://files.pythonhosted.org/packages/3c/0a/517489db4182a961c996ac31223f029e9276fd11328e247121a8d955aaf9/dockerhub-webhook-0.2.1.tar.gz" } ] }