2014-10-17 12:09:37 +02:00
|
|
|
title: Environment Variables
|
|
|
|
summary: Site configuration variables such as database connection details, environment type and remote login information.
|
|
|
|
|
|
|
|
# Environment Variables
|
|
|
|
|
|
|
|
Environment specific variables like database connection details, API keys and other server configuration should be kept
|
2017-01-30 16:34:55 +01:00
|
|
|
outside the application code in a separate `.env` file. This file is stored in the web root and
|
|
|
|
kept out of version control for security reasons.
|
2014-10-17 12:09:37 +02:00
|
|
|
|
2017-01-30 16:34:55 +01:00
|
|
|
For more information see our docs on [Environment Management](../../getting_started/environment_management/).
|
2014-10-17 12:09:37 +02:00
|
|
|
|
|
|
|
Data which isn't sensitive that can be in version control but is mostly static such as constants is best suited to be
|
2017-01-30 16:34:55 +01:00
|
|
|
included through the [Configuration API](configuration) based on the standard environment types (dev / test / live).
|
2017-11-27 04:39:17 +01:00
|
|
|
|
|
|
|
## Related Lessons
|
|
|
|
* [Up and running](https://www.silverstripe.org/learn/lessons/v4/up-and-running-setting-up-a-local-silverstripe-dev-environment-1)
|
|
|
|
* [Advanced environment configuration](https://www.silverstripe.org/learn/lessons/v4/advanced-environment-configuration-1)
|