node-config lets a Node.js application load settings from multiple file locations and override them with environment variables. A practical container setup packages defaults in config and supplies environment-specific changes through config-override. section 18.1
Organize settings by the kind of change they represent:
- Release-level settings stay the same for every environment in a release. section 18.1
- Environment-level settings distinguish test, development, production, and other deployment environments. section 18.1
- Feature-level settings switch behavior between releases, such as enabling or disabling metrics. section 18.1
Override a container's configuration
Run one container with image defaults, then mount config/dev as /app/config-override for a development configuration. Query each container's /config endpoint to compare settings. Add APP_METRICS_ENABLED=true to override one feature through the environment.
