You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new environment variable substitution is really handy. But as using a .env file is a common pattern for many projects, it should be possible to use env_file in combination with $VARIABLE substitution in the docker-compose.yml.
Often this is much more useful then just using variables from the current shell environment. This way, local configuration and credentials can stay out of version control (e.g. container hostnames, ports or database passwords).
The text was updated successfully, but these errors were encountered:
I've been taking this approach with either a bash alias, forego, foreman, or shoreman as a process wrapper for docker-compose.
I'm aware all of these are addressing the symptoms though. Would be great if docker-compose could itself read in and export the values for the current command.
I don't think we want to re-use env_file, that would be overloading the concept. However there is a related proposal in #2636 to use a different file. I'm going to close this issue for that one, I believe they are requesting the same feature.
The new environment variable substitution is really handy. But as using a
.env
file is a common pattern for many projects, it should be possible to useenv_file
in combination with$VARIABLE
substitution in the docker-compose.yml.Often this is much more useful then just using variables from the current shell environment. This way, local configuration and credentials can stay out of version control (e.g. container hostnames, ports or database passwords).
The text was updated successfully, but these errors were encountered: