compose/docs/env-file.md
Joffrey F 21aa7a0448 Documentation for .env file
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-03-24 10:57:01 -07:00

1.1 KiB

Environment file

Compose supports declaring default environment variables in an environment file named .env and placed in the same folder as your compose file.

Compose expects each line in an env file to be in VAR=VAL format. Lines beginning with # (i.e. comments) are ignored, as are blank lines.

Note: Values present in the environment at runtime will always override those defined inside the .env file.

Those environment variables will be used for variable substitution in your Compose file, but can also be used to define the following CLI variables:

  • COMPOSE_PROJECT_NAME
  • COMPOSE_FILE
  • COMPOSE_API_VERSION

More Compose documentation