Simplifying the configuration

Samuel ROZE
Sep 25, 2017 · 1 min read

TL;DR: ContinuousPipe’s variables can be promoted to environment variables through the UI or a YAML line.

The most common and recommended way of injecting configuration into a running container is through environment variables. When using ContinuousPipe, you can use variables within the configuration files to reduce duplication, use conditional values, or even use encrypted values.

But there are two aspects to consider here:

  • For newcomers, the difference between these variables and the environment variables is not clear
  • Passing variables to environment variable requires a lot of configuration lines

As a result, we’ve decided to add a new feature to ContinuousPipe that allows you to automatically promote a variable to an environment variable for all or some of your containers. You can now change the ‘promotion status’ of the variable directly within the user interface.

Image for post
Image for post
Promote variables in the user

As the user interface is a YAML generator, this feature is available within any YAML file:

variables:
# This variable will be accessible to every container
- name: DATABASE_URL
value: postgres://postgres
as_environment_variable: ['*']
# This variable will be accessible only for the "api" and "worker"
- name: SECRET
value: qwerty
as_environment_variable: ['api', 'worker']

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store