Additional Environments And Overrides


Sub-environments allow you to create additional, arbitrary environments that inherit development, staging, or production. You can add additional variables or override existing variables from the base environment. An ENVKEY can then be generated that connects to the sub-environment.

Read this for more details on sub-environments, and when they should and shouldn't be used.

Local Environment Variables

EnvKey will not overwrite existing local environment variables or additional variables set in a .env file. This can be convenient for customizing environments that otherwise share the same configuration, and is a lighter weight option than using sub-environments.

Say you have DATABASE_NAME set in EnvKey, but you want to temporarily connect to a different database. If you simply set your own DATABASE_NAMEenvironment variable, EnvKey will defer to it.

The same thing can be accomplished by adding additional lines to your .env file. For example:

# .env file


Now my-uniqe-db-name will override the EnvKey value.

results matching ""

    No results matching ""