Adding environment variable files in lando.#42
Adding environment variable files in lando.#42mohit-rocks wants to merge 1 commit intoaxelerant:mainfrom
Conversation
Currently DRUSH_OPTIONS_URI is set in drush.yml file. This is causing issues with hosts like platform.sh where they are reading this file as well. For now we can use environment variables in .lando directory so it remains active for local only. Another use case is when we configure blackfire etc. we need to add environment variables for those as well. Having seperate environment variable file specific to local lando can be useful for those cases.
|
@mohit-rocks, thanks for the PR. I am not clear on what you're fixing here. You said that I also don't understand the changes where you are creating a |
|
I think I see the issue now (or at least a part of it). The problem is that the hosts use the If so, I don't think the current fix is long-term. Loading the URI using an environment variable is fine but it will only apply to Lando context (i.e. when running As for the environment variables, I agree it is valuable but that works even right now with a root-level |
+1 to this. Let's review and think about more viable approach. Apart from running outside lando, my main intention was to provide an option for commands like As per the documentation of drush, it is suggested to use environment variable files. |
Why not using Drush aliases like |
|
@tormi, thanks. Do you find that command works as expected (i.e., does it give the proper URL instead of |
|
Yes, we've implemented it in here: https://github.com/wunderio/drupal-project/blob/master/drush/sites/self.site.yml#L16-L18 |
|
That's interesting @tormi @hussainweb , let me try it out and refactor this PR then. |
Currently DRUSH_OPTIONS_URI is set in drush.yml file.
This is causing issues with hosts like platform.sh where they are reading this file as well.
For now we can use environment variables in .lando directory so it remains active for local only.
Another use case is when we configure blackfire etc. we need to add environment variables for those as well.
Having seperate environment variable file specific to local lando can be useful for those cases.