# Environment variables in Compose


Environment variables and interpolation in Docker Compose help you create reusable, flexible configurations. This makes Dockerized applications easier to manage and deploy across environments.

> [!TIP]
>
> Before using environment variables, read through all of the information first to get a full picture of environment variables in Docker Compose.

This section covers:

- [How to set environment variables within your container's environment](/compose/how-tos/environment-variables/set-environment-variables/).
- [How environment variable precedence works within your container's environment](/compose/how-tos/environment-variables/envvars-precedence/).
- [Pre-defined environment variables](/compose/how-tos/environment-variables/envvars/).

It also covers: 
- How [interpolation](/compose/how-tos/environment-variables/variable-interpolation/) can be used to set variables within your Compose file and how it relates to a container's environment.
- Some [best practices](/compose/how-tos/environment-variables/best-practices/).

