{"id":20127308,"url":"https://github.com/ama-team/cookbook-docker-compose","last_synced_at":"2026-05-10T08:50:43.404Z","repository":{"id":140949255,"uuid":"80998412","full_name":"ama-team/cookbook-docker-compose","owner":"ama-team","description":"Cookbook for installing and working with docker-compose","archived":false,"fork":false,"pushed_at":"2020-06-22T08:48:37.000Z","size":37,"stargazers_count":1,"open_issues_count":3,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-13T08:21:52.574Z","etag":null,"topics":["chef","cookbook","docker-compose"],"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/ama-team.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-05T14:33:17.000Z","updated_at":"2017-07-31T13:32:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"a75d678a-e74d-4187-97b7-7ff8da669c8f","html_url":"https://github.com/ama-team/cookbook-docker-compose","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ama-team%2Fcookbook-docker-compose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ama-team%2Fcookbook-docker-compose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ama-team%2Fcookbook-docker-compose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ama-team%2Fcookbook-docker-compose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ama-team","download_url":"https://codeload.github.com/ama-team/cookbook-docker-compose/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241571662,"owners_count":19984136,"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":["chef","cookbook","docker-compose"],"created_at":"2024-11-13T20:20:25.980Z","updated_at":"2026-05-10T08:50:38.380Z","avatar_url":"https://github.com/ama-team.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ama-docker-compose Cookbook\n\nThis cookbook automates installation and usage of \n[Docker Compose][compose] tool.\n\nPlease not that most of the actions - at least for 0.1.x - are executed\nregardless of current state. Even if all containers are up and running,\naction `:up` will issue a new shell command. Single-service actions \nare not yet supported either.\n\nDev branch state:\n\n[![Travis branch](https://img.shields.io/travis/ama-team/cookbook-docker-compose/dev.svg?style=flat-square)](https://travis-ci.org/ama-team/cookbook-docker-compose)\n\n## Requirements\n\n### Platforms\n\n- Ubuntu LTS 14.04+\n- Debian 7+\n- Fedora 21+\n- Centos 6.5+\n\nShould work on other Linux distros as well, but we don't \nhave enough time to set up kitchen grounds for all cases. Should work\non Mac as well but never tested.\n\n### Chef\n\n- Chef 12.0 or later\n\n### Cookbooks\n\nThis cookbook doesn't have any dependencies on other cookbooks.\n\n## Attributes\n\nAttributes are used to set default values only.\n\n| Key                                 | Default  |\n|:------------------------------------|:---------|\n| `['ama-docker-compose']['version']` | `1.16.1` |\n\n## Recipes\n\nYou can skip some burden and include `default` recipe to install \nversion specified in attribute in default location \n(`/usr/local/bin/docker-compose`).\n\n## Resources\n\n### docker_compose_installation\n\nInstalls Docker Compose, latest version (known by cookbook) by default.\n\nExamples:\n\n```ruby\ndocker_compose_installation '/usr/local/bin/docker-compose'\n```\n\n```ruby\ndocker_compose_installation 'default' do\n  version '1.10.1' \n  path '/usr/local/bin/docker-compose'\nend\n```\n\nAvailable actions are `:create`/`:install` and `:delete`/`:remove`,\n`path` attribute defaults to resource name, `version` attribute\ndefaults to `node['ama-docker-compose']['version']`. I can't promise\nit will always be up to date, though.\n\n### docker_compose_deployment\n\nThis resource operates with docker composition (named as deployment for\nclarity), running commands as up, down, kill and others against set of\ndocker-compose files.\n\nExamples:\n\n```ruby\n# Runs up command against  specified file\ndocker_compose_deployment '/srv/router/docker-compose.yml'\n```\n\n```ruby\ndocker_compose_deployment '/srv/router/docker-compose.yml' do\n  environment({COMPOSE_PROJECT_NAME: 'my_custom_name'})\nend\n```\n\n```ruby\ndocker_compose_deployment 'router' do\n  executable '/usr/local/bin/docker-compose'\n  files '/srv/router/docker-compose.yml'\n  signal 'SIGHUP'\n  action :kill\nend\n```\n\n```ruby\ndocker_compose_deployment 'router' do\n  files ['/srv/router/docker-compose.yml', '/srv/router/docker-compose-overrides.yml']\n  timeout 10\n  action :stop\nend\n```\n\nAttributes:\n\n| Attribute | Types | Default | Description |\n|:----------------|:---|:---|:---|\n| `files`         | String / String[] | Resource name                   | Single or multiple paths to configuration files |\n| `executable`    | String            | `/usr/local/bin/docker-compose` | Path to specific docker-compose executable      |\n| `timeout`       | Integer / Nil     | `10`                            | Timeout for internal docker-compose commands where applicable |\n| `shell_timeout` | Integer / Nil     | `300`                           | Timeout for any underlying command to prevent infinite stalling | \n| `signal`        | String            | `SIGKILL`                       | Signal for kill command |\n| `scale`         | String            |                                 | Arguments for docker-compose scale command e.g. `nginx=2`|\n| `environment`   | Hash / Nil        | `{}`                            | Arbitrary environment variables to be passed to docker-compose call\n\nAvailable actions are:\n\n| Action     | Description                                          |\n|:-----------|:-----------------------------------------------------|\n| `:create`  | Maps to same docker-compose command                  |\n| `:start`   | Maps to same docker-compose command                  |\n| `:stop`    | Maps to same docker-compose command                  |\n| `:delete`  | Alias for `:rm` to preserve standard Chef action set |\n| `:rm`      | Maps to same docker-compose command                  |\n| `:restart` | Maps to same docker-compose command                  |\n| `:pull`    | Maps to same docker-compose command                  |\n| `:push`    | Maps to same docker-compose command                  |\n| `:up`      | Maps to same docker-compose command                  |\n| `:down`    | Maps to same docker-compose command                  |\n| `:kill`    | Maps to same docker-compose command                  |\n| `:scale`   | Maps to same docker-compose command                  |\n\n\nPlease note that those actions are always executed (at least, for now),\nsince it is difficult to check whether all containers are up, killed, \nstopped or anything else regarding state of deployment. However, you \ncan always use guard files that, if present, would guarantee action\nhas been executed.\n\n## Contributing\n\n1. Fork the repository on Github\n2. Create a named feature branch (like `add_component_x`)\n3. Write your change\n4. Write tests for your change (if applicable)\n5. Run the tests, ensuring they all pass\n6. Submit a Pull Request to `dev` branch using Github\n\n## License and Authors\n\nAuthors: AMA Team / Operations  \nLicense: MIT\n\nInformation about Docker Compose authors and license can be found in\n[official github repository][github/compose].\n\n  [compose]: https://docs.docker.com/compose/\n  [github/compose]: https://github.com/docker/compose\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fama-team%2Fcookbook-docker-compose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fama-team%2Fcookbook-docker-compose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fama-team%2Fcookbook-docker-compose/lists"}