Skip to content

mention earlier that compose looks for .env by default #24061

@n-bux

Description

@n-bux

Is this a docs issue?

  • My issue is about the documentation content or website

Type of issue

Other

Description

As a noob, I would expect the first option described on this page to be "use a .env file in the project directory, which is read by default" , whcih now is mentioned only later (here + here)

Location

https://docs.docker.com/compose/how-tos/environment-variables/set-environment-variables/

Suggestion

add as first section:

## Use a `.env` file 

Docker Compose by default looks for an `.env` file in the project directory in the project directory. For more details see [Variable Interpolation](https://docs.docker.com/compose/how-tos/environment-variables/variable-interpolation/#env-file) 

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/composeRelates to docker-compose.yml spec or docker-compose binary

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions