Building for any environment

Configuration files and environment variables should be set for different environments, such as dev/prod/test. Logging verbosity should be able to be set as per the environment. Developers might need increased logging for debugging. Application server configuration information can be set in a build file as well as database connection information and framework configuration.

Here is an example text file that can be used. One thing to note is that such files should not be committed to source control as they may contain client secrets and API secrets:

API_URL=http://localhost:8080PORT=8080AUTH_ZERO_CLIENT_ID=fakeClientIdAUTH_ZERO_JWT_TOKEN=someFaketToken.FakedToken.FakedAUTH_ZERO_URL=https://fake-api.comREDIS_PORT=redis:6379 ...

Get Hands-On Continuous Integration and Delivery 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.