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

feat: support for compose.yml #994

Merged
merged 1 commit into from
Oct 22, 2023
Merged

Conversation

dunglas
Copy link
Member

@dunglas dunglas commented Oct 6, 2023

Docker Compose now recommends using a definition file named compose.yaml and also supports compose.yml (the legacy docker-compose.ya?ml are still supported): https://docs.docker.com/compose/compose-file/03-compose-file/

This PR adds support for compose.ya?ml file to Flex, and changes the name of the generated file to compose.yaml, according to Docker best practices.

Closes #992.

Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be too early to generate composer.yaml by default. New docker versions still support docker-compose.yaml, isn't it? I think we should plan for a smoother transition period.

@nicolas-grekas
Copy link
Member

Alternatively, can we detect the version of docker that is in use?

@dunglas
Copy link
Member Author

dunglas commented Oct 10, 2023

It might be too early to generate composer.yaml by default.

Docker Compose support compose.yaml since 1.28.6 (2021-03-23). Docker Compose v1 stopped receiving updates in July 2023.
All currently maintained Docker Compose installations support this file name.

Also, it's weird to generate files on new projects (existing projects will continue working and are unaffected) that are marked as legacy by the upstream vendor.

Alternatively, can we detect the version of docker that is in use?

This should be possible, but is it worth it? Starting a new project with an EOLed version of Docker Compose looks very weird.

@fabpot fabpot changed the base branch from 2.x to 1.x October 22, 2023 18:04
@fabpot
Copy link
Member

fabpot commented Oct 22, 2023

Thank you @dunglas.

@fabpot fabpot merged commit 5529871 into symfony:1.x Oct 22, 2023
6 of 8 checks passed
@dunglas dunglas deleted the feat/compose.yml branch October 22, 2023 18:19
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 this pull request may close these issues.

Suggest adding management of the compose.yml file in addition to docker-compose.yml
3 participants