Compose supports declaring default environment variables in an environment
.env placed in the folder
docker-compose command is executed from
(current working directory).
Compose expects each line in an env file to be in
VAR=VAL format. Lines
# (i.e. comments) are ignored, as are blank lines.
Note: Values present in the environment at runtime will always override those defined inside the
.envfile. Similarly, values passed via command-line arguments take precedence as well.
Those environment variables will be used for variable substitution in your Compose file, but can also be used to define the following CLI variables: