nullstone-io / nullstone

Nullstone is a customizable developer platform launched on your cloud accounts.
https://nullstone.io
MIT License
39 stars 1 forks source link

Env var interpolation #124

Open BSick7 opened 1 year ago

BSick7 commented 1 year ago

Overview

Currently, environment variables can be injected into applications through capability modules or from user input.

It is common for various languages/frameworks to use different environment variable names for the same purpose. For example, some languages use DATABASE_URL instead of POSTGRES_URL. This can be pervasive for an application with many capabilities.

Additionally, Nullstone injects standard environment variables like the environment name which can be useful to different configurations.

Solution

Instead of forcing a user to rename their environment variables in their codebase, Nullstone will provide a mechanism to interpolate (or substitute) values of an environment variable with other environment variables.

Examples:

DATABASE_URL={{ POSTGRES_URL }}
API_URL=api {{ NULLSTONE_ENV }}.acme.com