{"id":22753191,"url":"https://github.com/nebulab/dru","last_synced_at":"2025-04-14T15:14:29.685Z","repository":{"id":62557519,"uuid":"158833408","full_name":"nebulab/dru","owner":"nebulab","description":"DRU - Docker-Compose Run Utility","archived":false,"fork":false,"pushed_at":"2020-04-04T12:16:54.000Z","size":110,"stargazers_count":6,"open_issues_count":14,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-14T15:14:24.435Z","etag":null,"topics":["cli","docker","docker-compose","dru","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nebulab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-23T13:00:34.000Z","updated_at":"2023-01-04T09:58:33.000Z","dependencies_parsed_at":"2022-11-03T06:30:32.008Z","dependency_job_id":null,"html_url":"https://github.com/nebulab/dru","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nebulab%2Fdru","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nebulab%2Fdru/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nebulab%2Fdru/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nebulab%2Fdru/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nebulab","download_url":"https://codeload.github.com/nebulab/dru/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248904637,"owners_count":21180835,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","docker","docker-compose","dru","ruby"],"created_at":"2024-12-11T06:09:30.773Z","updated_at":"2025-04-14T15:14:29.656Z","avatar_url":"https://github.com/nebulab.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Gem Version](https://badge.fury.io/rb/dru.svg)](https://badge.fury.io/rb/dru)\n[![CircleCI](https://circleci.com/gh/nebulab/dru/tree/master.svg?style=svg)](https://circleci.com/gh/nebulab/dru/tree/master)\n[![Maintainability](https://api.codeclimate.com/v1/badges/9049d097bf908467eb85/maintainability)](https://codeclimate.com/github/nebulab/dru/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/9049d097bf908467eb85/test_coverage)](https://codeclimate.com/github/nebulab/dru/test_coverage)\n\n# Dru\n\nDRU is a run utility to work on your projects with docker-compose where you can't put your config files inside the folder and also enhance the docker-compose command with custom commands, custom aliases, and environments support.\n\n## Why should you use DRU?\n\nSometimes when we are working on projects, we can't put docker related configuration files into the project folder\nor push it into our version control system.\n\nSure, we can always put the docker configuration files in a different place, but every time we have to run a command, it looks like:\n\n    $ docker-compose -f ~/config_folder/docker-compose.yml up\n\nand if we have another docker configuration for a different environment the things go even worst:\n\n    $ docker-compose -f ~/config_folder/docker-compose.yml -f ~/config_folder/docker-compose.test.yml up\n\nBy following some simple conventions, DRU let we run the first command with:\n\n    $ dru up\n\nand the second will be like:\n\n    $ dru -e test up\n\nFurthermore, if we need to access the docker container shell, with vanilla docker-compose:\n\n    $ docker-compose -f ~/config_folder/docker-compose.yml run --rm --entrypoint sh container_name\n\nwith DRU:\n\n    $ dru shell container_name\n\n## Installation\n\n    $ gem install dru\n\n## Usage\n\nRun:\n\n    $ dru help\n\nfor the list of the available commands.\n\nAll commands follow the same conventions. When you run a DRU command, by default it will look for a `docker-compose.yml` file into the `~/.dru/project_folder` where `project_folder` has the same name as the current working directory.\n\nSuppose that you are in a directory called `example_project`, when you run a DRU command (e.g. `dru up`) it will search for a `docker-compose.yml` file into the `~/.dru/example_project` folder.\n\nDRU also supports environments, that means that if you add the `-e test` option, it will combine the `~/.dru/example_project/docker-compose.yml` and `~/.dru/example_project/docker-compose.test.yml` into a single configuration.\n\nEssentially it will run `docker-compose -f ~/.dru/example_project/docker-compose.yml -f ~/.dru/example_project/docker-compose.test.yml` when the second file name is given by the environment option. See [docker-compose documentation](https://docs.docker.com/compose/reference/overview/#specifying-multiple-compose-files) for more informations.\n\n## Configuration\n\nTo override the default configuration you have to create the file `.druconfig` under your home folder:\n\n```yaml\n# ~/.druconfig\n\n# default: ~/.dru if you like, you can set a custom location (path) for your docker configurations projects like ~/docker-config\ndocker_projects_folder: ~/.dru\n\n# optional: use this if you want to create custom aliases\nalias:\n  shell: run --rm --entrypoint sh\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/nebulab/dru. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## License\n\nDRU is copyright © 2019 [Nebulab](http://nebulab.it/). It is free software, and may be redistributed under the terms specified in the [license](LICENSE.txt).\n\n## About\n\n![Nebulab](http://nebulab.it/assets/images/public/logo.svg)\n\nDRU is funded and maintained by the [Nebulab](http://nebulab.it/) team.\n\nWe firmly believe in the power of open-source. [Contact us](http://nebulab.it/contact-us/) if you like our work and you need help with your project design or development.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnebulab%2Fdru","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnebulab%2Fdru","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnebulab%2Fdru/lists"}