Application Configuration Changes Across Different Environments

In the last section, we created containers based on the same Docker image in each environment. A microservice will have configuration settings that likely need to change per environment, like feature flags to dynamically control service capabilities (turn on or off product recommendations), API keys for third-party services, or connection strings to dependent services like a web front end, database, or a logging service. These configuration settings can be changed per environment in a number of ways:

Use a Docker volume-mounted configuration file (for example, myservice.conf) that is deployed along with the container and is unique to each environment, similar to the example in ...

Get Microservices with Docker on Microsoft Azure™ (includes Content Update Program) now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.