Knowledgebase

Managing Environments and Configuration Print

  • webdevelopment, caching, staging, guide, howto, solution, zillionkinghost, hosting
  • 0

Development, staging and production.

WHAT SHOULD DIFFER

Credentials Endpoints Debug and logging settings Scale

WHAT SHOULD NOT

The code Runtime versions Dependency versions

WHY

Differences produce failures that appear only in production.

WHAT COMMONLY DIFFERS UNINTENTIONALLY

Runtime version Filename case sensitivity Available extensions Time zone

WHAT TO DO ABOUT THAT

Pin versions and use the same setup process everywhere.

WHERE TO PUT CONFIGURATION

Environment variables, or a file excluded from version control.

WHAT TO COMMIT

An example listing every required value.

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 obscurely later.

WHAT TO REMEMBER ABOUT CACHED CONFIGURATION

It does not re-read its source.

WHAT THAT CAUSES

Changes appearing not to take effect.

WHAT TO DO

Rebuild caches as part of every deployment.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot