inetum-orleans / docker-devbox-ddb

Erase environment differences, make developers happy !
https://inetum-orleans.github.io/docker-devbox-ddb
MIT License
4 stars 1 forks source link

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

Closed jeremyVignelles closed 1 year ago

jeremyVignelles commented 1 year ago

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 : https://github.com/inetum-orleans/docker-devbox-ddb/blob/ffb8f1916c559f3392bed8164a734f333fc54117/ddb/feature/docker/binaries.py#L64

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 commented 1 year ago

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.