-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Import dotenv file to os environment #9512
Conversation
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
1587c8f
to
67c13cf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
It doesn't appear that any tests were given with this PR, which would be useful for determining the desired behavior. As a user I was expecting that the default EDIT It does appear that the root |
Hi, looks like this breaks Previously I had # .env
KEY=DEFAULT_VALUE
# first-service.env
KEY=VALUE_FOR_FIRST_SERVICE
# second-service.env
KEY=VALUE_FOR_SECOND_SERVICE services:
first-service:
...
env_file:
- .env
- first-service.env
...
second-service:
...
env_file:
- .env
- second-service.env
... But now it always uses values specified in I guess such behaviour should be mentioned in the documentation. UPD: Actually priority of |
I agree with @wbydc, the env files passed with the We use it like this:
Before this PR, first, the Now, these env files declared in the |
They are not ignored, just processed in the wrong order as demonstrated in #9608 (comment) Either way, this 'fix' is currently breaking production environments and should be rolled back or fixed asap. |
@glours @laurazard |
Do we really want to have the I really can't understand why we want to have this feature in any place? As far as I understand it should be no problem to achieve the requested behavior with features available I would love to see to roll-back this and hardly think again about this "feature" |
I agree that the special status of Doing a quick round it seems at least Next.js, React, Symfony, Vite and Laravel switched to the |
This precedence issues should be fixed with #9636. About the |
@ulyssessouza Before 2.6 it did load |
why did a new feature get merged with 0 tests added? and why did it break things without tests failing anywhere? |
What I did
Import dotenv file to os environment to enable setting variables like
DOCKER_BUILDKIT
and others through.env
fileRelated issue
Resolves #9345