A release-level setting is packaged into the container image and stays the same wherever that release runs. It belongs in the image when the value identifies or enables behavior for the release itself, rather than the deployment environment. section 18.1 section 18.5
Separate release-level settings from settings that must change after deployment:
- Keep release-level values in the image, such as the release cycle name and default metrics behavior. section 18.1
- Supply environment-level values through an override file provided by the container platform. section 18.1 section 18.5
- Use feature-level environment variables for targeted changes, such as disabling metrics or reducing logging during a production problem. section 18.1 section 18.5
Run one image with different configuration
Start one container with the image defaults, then mount a development override directory into a second container: docker run -d -p 8080:80 diamol/ch18-access-log:2e; docker run -d -p 8081:80 -v "$(pwd)/config/dev:/app/config-override" diamol/ch18-access-log:2e. Query /config on both containers to compare the packaged release settings with the environment override. section 18.1
