{"id":14986140,"url":"https://github.com/leighmcculloch/vagrant-docker-compose","last_synced_at":"2025-05-15T16:04:26.723Z","repository":{"id":31701145,"uuid":"35266839","full_name":"leighmcculloch/vagrant-docker-compose","owner":"leighmcculloch","description":"A Vagrant provisioner for docker compose.","archived":false,"fork":false,"pushed_at":"2021-12-17T10:04:12.000Z","size":58,"stargazers_count":688,"open_issues_count":7,"forks_count":71,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-05-11T03:57:18.122Z","etag":null,"topics":["docker","docker-compose","vagrant","vagrant-plugin","vagrant-provisioner"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leighmcculloch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-08T08:09:07.000Z","updated_at":"2025-05-10T19:46:59.000Z","dependencies_parsed_at":"2022-08-21T01:50:54.677Z","dependency_job_id":null,"html_url":"https://github.com/leighmcculloch/vagrant-docker-compose","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leighmcculloch%2Fvagrant-docker-compose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leighmcculloch%2Fvagrant-docker-compose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leighmcculloch%2Fvagrant-docker-compose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leighmcculloch%2Fvagrant-docker-compose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leighmcculloch","download_url":"https://codeload.github.com/leighmcculloch/vagrant-docker-compose/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254374407,"owners_count":22060610,"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":["docker","docker-compose","vagrant","vagrant-plugin","vagrant-provisioner"],"created_at":"2024-09-24T14:12:23.895Z","updated_at":"2025-05-15T16:04:26.702Z","avatar_url":"https://github.com/leighmcculloch.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vagrant Provisioner: Docker Compose\n\n[![CircleCI](https://img.shields.io/circleci/build/github/leighmcculloch/vagrant-docker-compose?style=for-the-badge)](https://circleci.com/gh/leighmcculloch/vagrant-docker-compose/tree/master)\n\nA Vagrant provisioner for [Docker Compose](https://docs.docker.com/compose/). Installs Docker Compose and can also bring up the containers defined by a [docker-compose.yml](https://docs.docker.com/compose/yml/).\n\n## Install\n\n```bash\nvagrant plugin install vagrant-docker-compose\n```\n\n## Usage\n\n### To install docker and docker-compose\n\n```ruby\nVagrant.configure(\"2\") do |config|\n  config.vm.box = \"ubuntu/bionic64\"\n\n  config.vm.provision :docker\n  config.vm.provision :docker_compose\nend\n```\n\n### To install and run docker-compose on `vagrant up`\n\n```ruby\nVagrant.configure(\"2\") do |config|\n  config.vm.box = \"ubuntu/bionic64\"\n\n  config.vm.provision :docker\n  config.vm.provision :docker_compose, yml: \"/vagrant/docker-compose.yml\", run: \"always\"\nend\n```\n\nEquivalent to running:\n\n```bash\ndocker-compose -f [yml] up -d\n```\n\n### To install and run docker-compose, with multiple files, on `vagrant up`\n\n```ruby\nVagrant.configure(\"2\") do |config|\n  config.vm.box = \"ubuntu/bionic64\"\n\n  config.vm.provision :docker\n  config.vm.provision :docker_compose,\n    yml: [\n      \"/vagrant/docker-compose-base.yml\",\n      \"/vagrant/docker-compose.yml\",\n      ...\n    ],\n    run: \"always\"\nend\n```\n\nEquivalent to running:\n\n```bash\ndocker-compose -f [yml-0] -f [yml-1] ... up -d\n```\n\n### To install, rebuild and run docker-compose on `vagrant up`\n\n```ruby\nVagrant.configure(\"2\") do |config|\n  config.vm.box = \"ubuntu/bionic64\"\n\n  config.vm.provision :docker\n  config.vm.provision :docker_compose, yml: \"/vagrant/docker-compose.yml\", rebuild: true, run: \"always\"\nend\n```\n\nEquivalent to running:\n\n```bash\ndocker-compose -f [yml] rm --force\ndocker-compose -f [yml] build\ndocker-compose -f [yml] up -d\n```\n\n### To install, rebuild and run docker-compose with options on `vagrant up`\n\n```ruby\nVagrant.configure(\"2\") do |config|\n  config.vm.box = \"ubuntu/bionic64\"\n\n  config.vm.provision :docker\n  config.vm.provision :docker_compose, yml: \"/vagrant/docker-compose.yml\", rebuild: true,\n    options: \"--x-networking\", command_options: { rm: \"\", up: \"-d --timeout 20\"}, run: \"always\"\nend\n```\n\nEquivalent to running:\n\n```bash\ndocker-compose --x-networking -f [yml] rm\ndocker-compose --x-networking -f [yml] build\ndocker-compose --x-networking -f [yml] up -d --timeout 20\n```\n\n\n### Other configs\n\n* `yml` – one or more [Compose files](https://docs.docker.com/compose/compose-file/) (YAML), may be a `String` for a single file, or `Array` for multiple.\n* `compose_version` – defaults to `1.24.1`.\n* `project_name` – compose will default to naming the project `vagrant`.\n* `env` – a `Hash` of environment variables to value that are passed to the `docker-compose` commands, defaults to an empty `Hash`.\n* `executable_symlink_path` – the location the executable will be symlinked to, defaults to `/usr/local/bin/docker-compose`.\n* `executable_install_path` – the location the executable will be stored, defaults to `\u003cexecutable_symlink_path\u003e-\u003ccompose_version\u003e`, i.e. `/usr/local/bin/docker-compose-1.5.0`.\n* `options` - a `String` that's included as the first arguments when calling the docker-compose executable, you can use this to pass arbitrary options/flags to docker-compose, default to `nil`.\n* `command_options` - a `Hash` of docker-compose commands to options, you can use this to pass arbitrary options/flags to the docker-compose commands, defaults to: `{ rm: \"--force\", up: \"-d\" }`.\n\n## Example\n\nSee `example` in the repository for a full working example.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleighmcculloch%2Fvagrant-docker-compose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleighmcculloch%2Fvagrant-docker-compose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleighmcculloch%2Fvagrant-docker-compose/lists"}