{ "info": { "author": "Daniel Jilg", "author_email": "daniel@breakthesystem.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Build Tools" ], "description": "Jonah is a way to pack your Django Development, Deployment and Testing into Docker\n==================================================================================\n\n**Using Jonah, you can develop your Django application entirely within Docker.** This way, your code runs in the exact\nsame environment, whether it's on your machine, on the test server, or in deployment. Jonah saves you a lot of the\nsetup work in the beginning, letting you jump into a fully prepared, but configurable, Django Docker Project.\n\nIf you are using TDD, you can include Jonah on your build server to make sure all tests pass before pushing it to your\nstaging or production servers.\n\n----\n\n.. figure:: jonah.gif\n :alt: Animated GIF of jonah commands in action\n\n\nGetting Started\n---------------\n\nYou can install Jonah using ``pip``:\n\n::\n\n > pip install jonah\n\nThen run it using the ``jonah `` syntax. To start a new project, run\n\n::\n\n > jonah init your_new_project\n\nJonah will then create a new directory called ``your_new_project`` in the current working directory and create an empty\nDjango project inside.\n\nDeveloping Your Project\n~~~~~~~~~~~~~~~~~~~~~~~\n\nTo run your new empty project, run ``jonah develop``:\n\n::\n\n > cd your_new_project\n > jonah develop\n\nThis will build and launch the container, then launch the Django project inside the container. If you get any error\nmessages, check if your computer has a working and current installation of Docker. To check if your project is running,\nvisit ``http://localhost/`` (port 80) in your browser.\n\nThe ``ddp`` directory inside your project directory is transparently mounted into the container, so that any changes in\nyour code are directly applied to the running code. (For some changes, you might have to reload the Django server, but\nmore on that later.)\n\nMost of the time when developing a Django application, you don't need to restart the development server constantly. For\nchanges to models, settings, or changes to ``admin.py``, you can reload the Django server using this command:\n\n::\n\n > jonah reload\n\nGetting A Shell\n~~~~~~~~~~~~~~~\n\n\nNow, let's start a new app inside the project. To do that, you can use Jonah's ``shell`` feature. Open a shell inside\nthe container like so:\n\n::\n\n > jonah shell\n\nAfter a moment, you should see a new prompt looking something like ``root@a0e9d20bffdf:/code#`` to indicate you're\nworking inside the container. Change the working directory into the ``ddp`` dir and run the ``manage.py`` command like\nyou would normally:\n\n::\n\n > cd ddp\n > ./manage.py startapp my_new_app\n\nCongratulations! You just ran Django code inside your container. It is recommended that you run ``makemigrations``,\n``migrate``, and other ``manage.py`` commands like this as well. Type ``exit`` to exit the container shell and return\nto your regular command line.\n\nRunning Tests\n~~~~~~~~~~~~~\n\n``jonah test`` will run all your tests in the container and display live output.\n\nStopping the Container\n~~~~~~~~~~~~~~~~~~~~~~\n\nOnce you're calling it quits after a long day of productive coding, use ``jonah stop`` to shut down your container.\nHappy coding. :)\n\nMoving an Existing Project to Jonah\n-----------------------------------\n\nJonah is easiest to use when you start a new project. However, it should work with any directory that has a\n``Dockerfile`` and a ``jonah.ini`` file. A good way to move a Django project into Jonah would probably be the following:\n\n1. Rename your Django project to ``ddp``\n2. Create a new Jonah project with the name of your Django project\n3. Replace the ddp directory inside Jonah by your own\n4. Profit\n\n\nFull List of Commands\n---------------------\n\n===================== ==================================================================================================\nCommand Description\n===================== ==================================================================================================\n``init``\t Initialize a new jonah project in the current directory\n``build`` Build the image.\n``cleanbuild`` Build the image from scratch instead of relying on cached layers.\n``develop`` \t Run dev server\n``reload`` \t Reload Django process on dev server\n``shell`` \t Get a shell on the dev server\n``stop`` \t Stop a previously running development server\n``test`` \t Build and run Unit Tests\n``compilemessages``\t Compile internationalization Strings\n``tag`` \t Add git and docker tags\n``deploy`` \t Deploy to production. This command will ask you for a tag before pushing anything to the server\n``stage`` \t Deploy to staging\n``direct_deploy``\t Deploy as tag \"master\" on production server, without warning and without asking for confirmation\n``clean`` Delete exited containers, dangling images, and volumes. Good to clean up hard drive space.\n===================== ==================================================================================================\n\nTo get a full list of commands, run ``deploy.py`` without any arguments.\n\n\nConfiguration\n-------------\n\nThe ``init`` command will create a number of configuration files. Here is what they are used for:\n\n============================= ==========================================================================================\nFile Description\n============================= ==========================================================================================\n``jonah.ini`` General configuration for jonah, most importantly the Docker image name\n``requirements.txt`` This file is in Pip-Syntax. Python packages found here will be installed into the Docker\n container.\n``test.sh`` A shell script to run your tests. In many cases, this should just contain\n ``manage.py test``, but maybe you want to create code coverage, or include nose, or\n transform unit test results to other formats for your build server to use.\n``jonah/apt-packages.txt`` This file is in apt-get syntax. System packages that will be installed after basic system\n installation is complete.\n``jonah/supervisord.conf`` Config file for supervisord. By default, this runs ``spinup.sh``, then starts\n gunicorn and the Django server.\n``jonah/nginx.conf`` Config file for nginx. Look at this if you want to e.g. setup different static file\n handling.\n``jonah/spinup.sh`` A shell script to run EVERY TIME the container is spun up.\n``jonah/finalize_build.sh`` A shell script to run ONCE after the system installation has finished.\n============================= ==========================================================================================\n\n\nSidebar: Why ``ddp``?\n---------------------\nWhat is the meaning of the ``ddp`` directory?\n\nWhile a Jonah project can have any name, the *Django project* it encapsulates *needs* to be called ``ddp``, so all\nthe scripts and calls inside Jonah know where to find the Django project, how to specify settings, etc. \"DDP\" stands\nfor \"Docker Deployable Project\".\n\nWhile this constraint could be lifted in the future, it is not very high on our list of priorities right now. If you\nfeel differently, please let us know by opening or adding to an issue on GitHub.\n\nHelp Out and Code of Conduct\n----------------------------\n\nWe\u2019d like to encourage your feature requests, bug reports and pull requests. Please note that the\n`Django Code of Conduct`_ applies to this project. Be friendly, welcoming, considerate, respectful, and be careful\nin the words that you choose please. If you think you\u2019ve witnessed a CoC violation, please contact Daniel.\n\nHeritage\n--------\n\nJonah is inspired by `Joe Mornin\u2019s excellent ``django-docker```_.\n\nLicense\n-------\n\nThis project is released under the MIT license. See the ``LICENSE`` file for more info.\n\n.. _Django Code of Conduct: https://www.djangoproject.com/conduct/\n.. _Joe Mornin\u2019s excellent ``django-docker``: https://github.com/morninj/django-docker", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/elgatosf/jonah", "keywords": "docker container deployment build test", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "jonah", "package_url": "https://pypi.org/project/jonah/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/jonah/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/elgatosf/jonah" }, "release_url": "https://pypi.org/project/jonah/1.1.1/", "requires_dist": null, "requires_python": null, "summary": "A way to pack your Django Development, Deployment and Testing into Docker", "version": "1.1.1" }, "last_serial": 2916695, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "233b7370696eaa7f3c8fe1a5c4c542eb", "sha256": "76e7ffac33d1bab1624af0bb16fcf350ebd3b7723ed72d5826f2c85d9525a697" }, "downloads": -1, "filename": "jonah-1.0.0.tar.gz", "has_sig": false, "md5_digest": "233b7370696eaa7f3c8fe1a5c4c542eb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9646, "upload_time": "2017-03-09T13:07:08", "url": "https://files.pythonhosted.org/packages/86/9e/9be5c4b7bc711ca4498c2cfe70c2fe2e6ce7e83248c235d2785515736db7/jonah-1.0.0.tar.gz" } ], "1.0.0.dev1": [], "1.0.0.dev2": [], "1.0.1": [ { "comment_text": "", "digests": { "md5": "6c22bcfa80dbc6793cba953d3a3316d3", "sha256": "fcf2e55eb12eaf1dca4e153a4cd9443db756c9722e2142444b5064767adbf9f5" }, "downloads": -1, "filename": "jonah-1.0.1.tar.gz", "has_sig": false, "md5_digest": "6c22bcfa80dbc6793cba953d3a3316d3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9789, "upload_time": "2017-03-14T13:15:59", "url": "https://files.pythonhosted.org/packages/d7/48/6d91ada009c328459a4d55f4c3a6c6dd39e0f09519d6512d4a35d6e2c0eb/jonah-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "8c46a326a2e5fdd457c9e16f7563e409", "sha256": "7b9edd51a92a614e793f318c410c3c320c0fbceecb1f468b3d11bca7a88e6933" }, "downloads": -1, "filename": "jonah-1.0.2.tar.gz", "has_sig": false, "md5_digest": "8c46a326a2e5fdd457c9e16f7563e409", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9790, "upload_time": "2017-03-15T10:25:22", "url": "https://files.pythonhosted.org/packages/fc/5f/3655e5b64b5e6f16afc8fb79dc953e2ee0aaea705e7598142f3e3d4bbf46/jonah-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "d9b77cb64d93f1cf39593a6b99a460b8", "sha256": "5b339bb00fc841b341d050fe82c73a1b53df09f966d415127dfd0189702f4c83" }, "downloads": -1, "filename": "jonah-1.0.3.tar.gz", "has_sig": false, "md5_digest": "d9b77cb64d93f1cf39593a6b99a460b8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10016, "upload_time": "2017-05-30T15:20:15", "url": "https://files.pythonhosted.org/packages/d9/4d/a4dbe24f603d8fedc6795c1a91c8ab91e6d714f3c82ce4fca5456deee542/jonah-1.0.3.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "10edbb9cb2f76e5951f14a4133d1e7f1", "sha256": "2244a5f35e40b932adbea91c8ebaf508cad026d6414e6ba694c5c43bac386256" }, "downloads": -1, "filename": "jonah-1.1.1.tar.gz", "has_sig": false, "md5_digest": "10edbb9cb2f76e5951f14a4133d1e7f1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16178, "upload_time": "2017-06-01T12:41:28", "url": "https://files.pythonhosted.org/packages/23/ae/cf77ef00926ccf864b61211aaf5f9bd3065f0cbff633840ffc7e53182e6c/jonah-1.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "10edbb9cb2f76e5951f14a4133d1e7f1", "sha256": "2244a5f35e40b932adbea91c8ebaf508cad026d6414e6ba694c5c43bac386256" }, "downloads": -1, "filename": "jonah-1.1.1.tar.gz", "has_sig": false, "md5_digest": "10edbb9cb2f76e5951f14a4133d1e7f1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16178, "upload_time": "2017-06-01T12:41:28", "url": "https://files.pythonhosted.org/packages/23/ae/cf77ef00926ccf864b61211aaf5f9bd3065f0cbff633840ffc7e53182e6c/jonah-1.1.1.tar.gz" } ] }