vagrant-docker-compose
vagrant-docker-compose copied to clipboard
Is "docker-compose.override.yml" supported?
Hi, I was wondering if "docker-compose.override.yml" was supported as stated in Extending services and Compose files
By default, Compose reads two files, a docker-compose.yml and an optional docker-compose.override.yml file. By convention, the docker-compose.yml contains your base configuration. The override file, as its name implies, can contain configuration overrides for existing services or entirely new services.
I tried but it didn't work for me (both yml files residing in the same folder)
I'm using something like this in my Vagrantfile:
# Use Docker Compose
# Plugin: https://github.com/leighmcculloch/vagrant-docker-compose
docker_yml = ["/vagrant/docker/docker-compose.yml"]
# The docker provisioner doesn't autodetect the override.yml
if File.exist?("docker/docker-compose.project.override.yml")
docker_yml << "/vagrant/docker/docker-compose.project.override.yml"
end
if File.exist?("docker/docker-compose.override.yml")
docker_yml << "/vagrant/docker/docker-compose.override.yml"
end
config.vm.provision :docker
config.vm.provision :docker_compose,
yml: docker_yml
Ahh, we could add loading both in the next version I think. @2trc did you want to open a pull request adding it? Otherwise I'll put it in the queue of things to get done.