-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Document setting Drush config values via environment variable #3009
Comments
The standard is for a |
I have used .env files on a couple project and find them very convenient. Sounds great. I think this change in Drush could happen in parallel with a consolidation/config change, right? |
For new designs it is often preferable to implement in Drush first, and then refactor / extract to external components. In cases like this where the new behavior is already incremental to functionality that has already been extracted, I'd say that it is best & just as easy to implement directly in consolidation/config first. |
We need a way to map from a config element to an environment variable. Maybe convert The two obvious flaws with this proposal:
Terminus searches both $_SERVER and $_ENV for matches, and overrides Terminus has neither hierarchy nor Maybe rather than reading all of the env variables and applying them as a config, we could instead change the implementation of default handling to check the environment variable before returning the default value. Then the lossy transformation to |
My original idea for this issue is now a PR at #3137 However, lets discuss the Env variable mapping. It looks like consolidation/config now supports setting config from Env variables. We need to document how that works, or point to docs in consolidation/config. @greg-1-anderson any chance you could write a couple examples here. I can turn them into docs on examples/example.drush.yml To answer the questions above
|
consolidation/config maps both |
My 5 cents: I created a PR which allows you to use environment variables in your alias (yaml) file same way as Symfony does it. Have a look at #3202 |
yaml-expander got the nice env feature we hoped for. docs still needed. |
The logic for the default value for this config is in drush_find_tmp(). Not changing any logic here, using config system.
The text was updated successfully, but these errors were encountered: