Environments
Utilizing Environment Variables for Tailored Configurations
Last updated
Utilizing Environment Variables for Tailored Configurations
Last updated
Environment variables are a set of constants that hold key information across different releases within a specific environment. These variables are critical in separating the concerns of various environments, such as development, testing, or production, each potentially requiring different configurations. By using environment variables, companies can manage and switch between these distinct settings seamlessly, ensuring that each environment is isolated and configured with its appropriate resources.
For instance, a production environment might interact with a live customer database, whereas a development environment would use a test database to prevent any impact on real customer data. Environment variables can also store contextual details about the release, such as the language or geographical region, allowing for greater customization and localization of services.
Group | Prefix | Key | Type | Description |
---|---|---|---|---|
Environment variables are prominently used within service configurations to manage technical details that vary between environments. The following demonstrates how you can set and use these variables within the Service screen:
Environment variables are applied to securely configure and differentiate these services for various environments. By configuring these settings through environment variables, you not only maintain a clear separation between your environments but also enable easy adjustments and scaling of your services. When you deploy or update an environment, these variables automatically apply the correct settings without the need for manual intervention.
Moreover, employing environment variables is a best practice for securing sensitive information such as API keys or database credentials. By keeping these details out of the codebase, you ensure they are not exposed, particularly when your code is stored in version control systems.
Environment
env.
env.<variableName>
string
References previously defined environment variables.