Export documented environment variables into web container, fixes #2486 #2488
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Problem/Issue/Bug:
#2486: Although a number of environment variables were created and were intended to be added into the web container, some of them were not exported via the .ddev-docker-compose*.yaml, so did not end up inside the container.
How this PR Solves The Problem:
Make sure they get exported.
Manual Testing Instructions:
Verify that $DDEV_DOCROOT and all other named environment variables in the container section of https://ddev.readthedocs.io/en/stable/users/extend/custom-commands/#environment-variables-provided are properly set inside the container.
Automated Testing Overview:
Added TestEnvironmentVariables to verify values in container and on host
Related Issue Link(s):
Release/Deployment notes:
I used these custom commands (global) for testing: https://gist.github.com/rfay/8773faca379cc22c9c4b5cc61e75f6e6