Understanding environment variables

Version: 10.5

Environment variables are the preferred mechanism for passing configuration settings into Sitecore containers.

The environment variable configuration file .env contains all the environment variables. Docker Compose loads these automatically during startup. The .env file for the Sitecore deployment is included in the Sitecore Container Deployment package.

Important

Each environment variable must fit inside a 30,000 character block in the .env file. If the size of the variable exceeds 30,000 characters, the system will not deploy successfully.

If you want to reuse environment variables across multiple environments, you must set the environment variables in the Windows OS and remove the corresponding keys from the environment variable configuration file that is used by Docker Compose.

If you have suggestions for improving this article, let us know!