Skip to content
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

Force docker-compose.yml file path when a conflicting file exists #222

Closed
jeremyVignelles opened this issue Mar 31, 2023 · 1 comment · Fixed by #224
Closed

Force docker-compose.yml file path when a conflicting file exists #222

jeremyVignelles opened this issue Mar 31, 2023 · 1 comment · Fixed by #224

Comments

@jeremyVignelles
Copy link
Collaborator

I have a folder in which I want to setup a ddb environment for a project I clone under it.
That cloned project have a docker-compoe.yml file, which the docker compose run uses by default, when I run $(ddb run npm).

This is due to this part of the code :

params = ["exec"] if hasattr(self, "exe") and self.exe else ["run", "--rm"]

Either we should provide a way to override this behavior manually, or we need to detect that conflicting docker-devbox.yml file, and force the -f option in that case. Another option would be just putting -f every time on the commands, to avoid such conflict.

What do you think ?

@Toilal
Copy link
Contributor

Toilal commented Mar 31, 2023

export DDB_RUN_OPTS="-f ${DDB_PROJECT_HOME}/docker-compose.yml" should work as a workaround for now, but I'll appreciate a pull request adding the -f flag on every ddb run command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants