Managing application configuration in Docker Swarm

I spent some time in Chapter 5Adopting Container-First Solution Design building a flexible configuration system into my Docker images for the NerdDinner stack. The core principle of that was to bundle the default configuration for development into each image, but allow settings to be overridden when you run a container. That means we'll use the same Docker image in every environment, just swapping out the configuration settings to change behavior.

That works for a single Docker Engine where I can use environment variables to override individual settings and volume mounts to replace whole configuration files. You can do much more with configuration in Docker Swarm—using Docker config objects and Docker secrets to store data in the swarm that can be delivered to containers. This is a much neater way of dealing with configuration and sensitive data than using environment variables and files, but it means I still use the same Docker image in every environment.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.17.76.72