Settings that differ.
WHAT DIFFERS BETWEEN ENVIRONMENTS
Credentials Addresses and endpoints Debug settings Feature toggles Scale-related settings
WHAT SHOULD NOT DIFFER
The structure of the configuration The code
WHERE TO PUT IT
Environment variables, or a file per environment excluded from version control.
WHAT TO COMMIT
An example listing every required value.
WHY
So a missing value is obvious, not mysterious.
WHAT TO DO AT STARTUP
Validate that required values are present, and fail clearly if not.
WHY
Failing immediately with a clear message beats failing later, obscurely.
WHAT TO BE CAREFUL WITH
Cached configuration, which does not re-read the source.
WHAT THAT CAUSES
Changes appearing not to take effect.
WHAT TO DO
Rebuild caches as part of deployment, always.
WHAT TO DOCUMENT
Every setting and what it does.
WHAT TO REVIEW
Whether each environment has the values it should.