Skip to content

Configuration

Environment-dependent information

Environment-dependent configuration information must not be hard-coded, but externally configurable, e.g. as an environment variable. This configuration must be possible to be done from outside the artifact, without environment-specific builds for example.

Rule of thumb: the (executable) code itself should not know or care about which environment it runs on or how many there are.

Vice versa, only make configurable what changes with the environment. An ENTRIES_PER_PAGE configuration usually is not such an item. This should rather be a constant near the place where it occurs.

See also Secrets Manager.