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

allow a local .env file to override compose.yaml sibling .env #11824

Merged
merged 1 commit into from
May 21, 2024

Conversation

ndeloof
Copy link
Contributor

@ndeloof ndeloof commented May 16, 2024

What I did
Allow local .env file both to set COMPOSE_* variables and override .env file aside the target compose.yaml file

This restores behavior seen in compose v2 before v2.24.x, while undocumented. Was initially introduced by #9512 while not designed for this usage, but users started then to rely on this "feature"

A doc PR will follow so this is well documented

Related issue
fixes #11823
fixes #11575

https://docker.atlassian.net/browse/COMP-570

(not mandatory) A picture of a cute animal, if possible in relation to what you did

@ndeloof ndeloof requested review from a team, glours, milas and jhrotko and removed request for a team May 16, 2024 07:44
Copy link
Contributor

@jhrotko jhrotko left a comment

Choose a reason for hiding this comment

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

LGTM

@jhrotko
Copy link
Contributor

jhrotko commented May 21, 2024

This restores behavior seen in compose v2 before v2.24.x, while undocumented.

Did you change the documentation to make it more clear? I remember you have mentioned it before just asking the current status

@ndeloof
Copy link
Contributor Author

ndeloof commented May 21, 2024

@jhrotko I'll do once this PR is merged

@ndeloof ndeloof merged commit 9e8c8ca into docker:main May 21, 2024
28 checks passed
@ndeloof ndeloof deleted the dotEnvStrikesBack branch May 21, 2024 14:01
aequitas added a commit to internetstandards/Internet.nl that referenced this pull request Jun 5, 2024
- Docker Compose 2.24 broke behaviour we rely on for merging .env files. Versions since 2.27.1 restore this funcitonality: docker/compose#11824
aequitas added a commit to internetstandards/Internet.nl that referenced this pull request Jun 5, 2024
- Docker Compose 2.24 broke behaviour we rely on for merging .env files. Versions since 2.27.1 restore this funcitonality: docker/compose#11824
mxsasha pushed a commit to internetstandards/Internet.nl that referenced this pull request Jun 13, 2024
- Docker Compose 2.24 broke behaviour we rely on for merging .env files. Versions since 2.27.1 restore this funcitonality: docker/compose#11824
mxsasha pushed a commit to internetstandards/Internet.nl that referenced this pull request Jun 17, 2024
- Docker Compose 2.24 broke behaviour we rely on for merging .env files. Versions since 2.27.1 restore this funcitonality: docker/compose#11824
mxsasha pushed a commit to internetstandards/Internet.nl that referenced this pull request Jul 24, 2024
- Docker Compose 2.24 broke behaviour we rely on for merging .env files. Versions since 2.27.1 restore this funcitonality: docker/compose#11824

(cherry picked from commit 600e930)
mxsasha pushed a commit to internetstandards/Internet.nl that referenced this pull request Aug 12, 2024
- Docker Compose 2.24 broke behaviour we rely on for merging .env files. Versions since 2.27.1 restore this funcitonality: docker/compose#11824

(cherry picked from commit 600e930)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants