-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
".env" not taken into account #52
Comments
Can you share the directory structure of where your .env office is located? |
Everything is toplevel:
The config.vm.provision "app",
type: "docker_compose",
compose_version: "1.22.0",
yml: "/vagrant/docker-compose.yml",
env: {
# I'd like to get rid of this
},
run: "always" I also noticed that |
🤔 That's a good point. If we supported a working directory it would make working with this a lot easier. @mbrodala Are you up for taking a stab at adding support for this and opening a PR? |
I'd love to but unfortunately I have limited time ATM. :-/ |
As a workaround we now use a setup like this: config.vm.provision :docker_compose,
compose_version: "1.22.0"
config.vm.provision "app",
type: "shell",
keep_color: true,
privileged: false,
run: "always",
inline: <<-SCRIPT
cd /vagrant
docker-compose up --detach
SCRIPT This has many advantages:
|
This is a duplicate of #43, let's track there. |
We noticed that our local
.env
file is not used bydocker-compose
which is used to set various options.I assume that's becaues
docker-compose
is executed in the default login directory (e.g./home/vagrant
) instead of the directory of the.env
file. In our case that would be/vagrant
where the Compose files are located too.Would it be possible to add an option to switch the working directory for the
docker-compose
command?This could be related to #43.
The text was updated successfully, but these errors were encountered: