You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR was squashed before being merged into the 1.9-dev branch.
Discussion
----------
Improve Docker Compose file detection
This PR implements the rules described in the Docker Compose manual: https://docs.docker.com/compose/reference/envvars/#compose_file (see also #705 (comment), cc @jycamier).
Basically, the directory containing the Compose definition can be configured using the `COMPOSE_FILE` environment variable, and it isn't defined Flex will look for the Compose file (as `docker-compose itself`) in the project directory and then in each parent director.
This will be especially helpful for API Platform, where the `docker-compose.yml` file is in the parent directory of the Symfony application (https://github.com/api-platform/api-platform/), but also for other monolithic Git repositories containing several applications and a `docker-compose.yaml` file at the root (which is very common and considered a best practice).
There is a voluntary limitation regarding the `COMPOSE_FILE` environment variable: the name of the file **must** be the one defined in the recipe (with the `.yml` or `.yaml` extension). In other words, only the directory is configurable, not the file name (on purpose).
Commits
-------
d04b0b6 Improve Docker Compose file detection
0 commit comments