{ "info": { "author": "Roberto Aguilar", "author_email": "roberto.c.aguilar@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# DC\nThe `dc` command is a wrapper around [`docker-compose`](https://docs.docker.com/compose/) that codifies workflows and repeatedly used commands into rememberable, easy to type one-liners. Can be installed from pypi:\n\n```\npip install dc-workflows\n```\n\n## sample dc.yml\n\nTake following `dc.yml` file:\n\n```\nprofiles:\n build:\n - docker-compose.yml\n - build\n\n local:\n - docker-compose.yml\n - postgres\n\n stack:\n - docker-compose-stack.yml\n\n test:\n - docker-compose.yml\n - postgres\n - test\n\ntasks:\n publish:\n command: dc --profile build -e api --tag-version --tag-docker-image --write-tag --push build\n\n deploy:\n command: dc --profile stack -e api --deploy\n\n dev-publish:\n command: dc --profile build -e dev-api --tag-version --tag-docker-image --write-tag --push build\n\n dev-deploy:\n command: dc --profile stack -e dev-api --deploy\n\n local:\n command: dc --profile local -e local-api\n\n local-build:\n command: dc task local build app\n\n test:\n command: dc --profile test --project-name api-test\n\n test-build:\n command: dc task test build\n```\n\nIt defines four profiles; for local development, testing, building, deploying a stack to a Docker Swarm. It also defines a number of tasks. Notice their length and imagine consistently writing them throughout your work day.\n\nUsing `dc` with the configuration above, publishing a production image is done with the command:\n\n```\ndc task publish\n```\n\nSimilarly, deploying to the Swarm:\n\n```\ndc task deploy\n```\n\nTasks themselves are composable, such as `local` and `local-build` above. Note that `local-build` is written as an extension to the `local` task.\n\n\n### Environments\n\nInstead of keeping environments in the repo's working copy, they are, by default, stored in `~/.docker/_environments`. This location can be overridden with the `DC_ENVIRONMENT` environment variable. These files are simple `key=value` pairs, such as:\n\n```\nDJANGO_DEBUG=False\nDOCKER_IMAGE=roberto/api:0.0.1\n```\n\n\n### Tag Versioning\n\nThe `--tag-version` argument uses another utility, [tag-version](https://github.com/rca/tag-version) to generate a tag based on git tags.\n\nThe `--tag-docker-image` argument will use the `tag-version` command's result as the tag for the generated docker image.\n\nThe `--write-tag` argument will re-write the `DOCKER_IMAGE` variable in the environment file.\n\nThe `--push` argument will automatically run `docker push` when the build runs successfully.\n\n\n## History\nDocker Compose is great. It allows you to put together pretty sophisticated commands that, in turn, produce some really powerful results. The problem is remembering the commands as they can become long an cumbersome.\n\nFor example, `docker-compose` allows to overlay multiple compose files together where each subsequent compose file overrides the previous file's settings. Repeatedly writing this on the command line is cumbersome and error-prone:\n\n```\ndocker-compose -f docker-compose.yml -f docker-compose.dev.yml [...]\n```\n\nDocker Compose also allows specifying environment variables in a `.env` file rather than hard coding them in the compose files themselves. This is also error-prone, especially when using compose to deploy stacks, which may be production environments that use different settings for backing services such as databases.\n\nAnother issue with vanilla `docker-compose` is its inconsistency when substituting environment variables in compose.yml files; sometimes they apply, sometimes they don't.\n\n`dc` eliminates these limitations by pre-processing the compose file and rendering out a yml file with the values found in the environment. It also eliminates accidentally mis-writing a command, by aliasing the commands with memorable tasks.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/rca/dc", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "dc-workflows", "package_url": "https://pypi.org/project/dc-workflows/", "platform": "", "project_url": "https://pypi.org/project/dc-workflows/", "project_urls": { "Homepage": "https://github.com/rca/dc" }, "release_url": "https://pypi.org/project/dc-workflows/0.2.2/", "requires_dist": null, "requires_python": "", "summary": "codified workflows for docker compose", "version": "0.2.2" }, "last_serial": 3708791, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "f184cf772fed1618025e9f9c07f2cf73", "sha256": "583b4c5c535ca0cc9c9d906b23511bf2a5e2d3d99f900bffa617ab11dde4b8ef" }, "downloads": -1, "filename": "dc-workflows-0.0.1.tar.gz", "has_sig": false, "md5_digest": "f184cf772fed1618025e9f9c07f2cf73", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5974, "upload_time": "2017-12-14T17:40:31", "url": "https://files.pythonhosted.org/packages/a1/41/a4aee107ad11e26876712d6fc97b84c6facc514f8bf997c0cdf38110799e/dc-workflows-0.0.1.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "83702a523f0933cc08e02d4836b1c2bc", "sha256": "b9a677ea7ded7d94fb9645723688f29926efc18aacbe04edf4c3f87c8119fb45" }, "downloads": -1, "filename": "dc-workflows-0.1.0.tar.gz", "has_sig": false, "md5_digest": "83702a523f0933cc08e02d4836b1c2bc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6829, "upload_time": "2017-12-18T14:25:29", "url": "https://files.pythonhosted.org/packages/2e/62/90bc6ff8b51f996257ae9e09b4e17da69411fd703f75449d51b23576629d/dc-workflows-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "560f594fca41db7b214cbfa3d1a912b0", "sha256": "10cf500f9ee10a3c16aa671179267bd8cdd6a6e91ffb822ae12c33adc202fb6a" }, "downloads": -1, "filename": "dc-workflows-0.1.1.tar.gz", "has_sig": false, "md5_digest": "560f594fca41db7b214cbfa3d1a912b0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6853, "upload_time": "2017-12-18T17:01:26", "url": "https://files.pythonhosted.org/packages/7a/de/772e8ea926f48683a1e1f03cedf78cde50fbced9559dceba42635633ca45/dc-workflows-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "d5866731e0e8da6e041bd71b146cf349", "sha256": "5ac2e7de20440b405c671531a7c85c85f7835406e91a433b9a75c2a136650946" }, "downloads": -1, "filename": "dc-workflows-0.2.0.tar.gz", "has_sig": false, "md5_digest": "d5866731e0e8da6e041bd71b146cf349", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7126, "upload_time": "2018-02-12T23:52:30", "url": "https://files.pythonhosted.org/packages/84/b5/54d031f6b1e2600070332e6ab514d5947ed4652b3d33235004d4a3ce0849/dc-workflows-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "b19ba31f4473abe247411f5efc42d7df", "sha256": "55dcda99b895645c55f1f0db5f618fc869cff309d5bde404ba1713afe69c535c" }, "downloads": -1, "filename": "dc-workflows-0.2.1.tar.gz", "has_sig": false, "md5_digest": "b19ba31f4473abe247411f5efc42d7df", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7125, "upload_time": "2018-03-23T17:50:31", "url": "https://files.pythonhosted.org/packages/33/02/8c36c4e28afb1bf3b4ea48f73ca1038de6927425a1bd8413d36088f35469/dc-workflows-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "1cdc2df9df1a48dd018008f8468111c5", "sha256": "8eb38b416e703b17563e0932f56430a87f827f331ac59d9d6139bc35187eed72" }, "downloads": -1, "filename": "dc-workflows-0.2.2.tar.gz", "has_sig": false, "md5_digest": "1cdc2df9df1a48dd018008f8468111c5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7119, "upload_time": "2018-03-27T03:04:06", "url": "https://files.pythonhosted.org/packages/df/d8/00e52c2197eae7d13d39c1831f50c4c76a880544cc666042aa45294d1ea7/dc-workflows-0.2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1cdc2df9df1a48dd018008f8468111c5", "sha256": "8eb38b416e703b17563e0932f56430a87f827f331ac59d9d6139bc35187eed72" }, "downloads": -1, "filename": "dc-workflows-0.2.2.tar.gz", "has_sig": false, "md5_digest": "1cdc2df9df1a48dd018008f8468111c5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7119, "upload_time": "2018-03-27T03:04:06", "url": "https://files.pythonhosted.org/packages/df/d8/00e52c2197eae7d13d39c1831f50c4c76a880544cc666042aa45294d1ea7/dc-workflows-0.2.2.tar.gz" } ] }