What is the problem this feature will solve?
Sometimes it's helpful to derive the value of variables from other variables, using variable expansion.
For example, consider the following .env file:
APPLICATION_PORT: 8080
BASE_URL: http://localhost:8080
The APPLICATION_PORT and BASE_URL should have the same port. For reasons external to this issue, BASE_URL cannot be split into two variables without causing confusion.
If there are external overrides to APPLICATION_PORT, they won't remain in sync with BASE_URL.
What is the feature you are proposing to solve the problem?
Instead we could write .env files like this:
APPLICATION_PORT: 8080
BASE_URL: http://localhost:${APPLICATION_PORT}
This is already supported by at least bash, and the concept of variable expansion in environmental configuration is also common in ecosystems such as Kubernetes.
What alternatives have you considered?
- Using
dotenvx
- Splitting variables up into their lowest common set
What is the problem this feature will solve?
Sometimes it's helpful to derive the value of variables from other variables, using variable expansion.
For example, consider the following .env file:
The
APPLICATION_PORTandBASE_URLshould have the same port. For reasons external to this issue, BASE_URL cannot be split into two variables without causing confusion.If there are external overrides to
APPLICATION_PORT, they won't remain in sync withBASE_URL.What is the feature you are proposing to solve the problem?
Instead we could write
.envfiles like this:This is already supported by at least bash, and the concept of variable expansion in environmental configuration is also common in ecosystems such as Kubernetes.
What alternatives have you considered?
dotenvx