Setting application-specific environment variables

It is very common that people deploy their application in multiple environments, such as testing, staging, and production. Usually, the configuration differs between these environments to ensure that you are using the right service for the right environment. Consider an example where you want to send e-mails in your application. In the production environment, you would like to use the cloud e-mail service, such as Sendmail (accessible at https://www.sendmail.com/), but in the development environment, you would like to use an open source version of Sendmail. Environment variables provide a programming language and operating-system-agnostic solution to these kinds of problems.

Hard coding configuration ...

Get OpenShift Cookbook 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.