-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[Feature Request] Custom envsubst for templating with default values #592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
What is an actual use case for that? If you're providing a template, you surely control what's inside of a template and can just not use whatever is not supported by envsubst? |
You can create a universal template with defaults and reduce amount of variables to passing into container. Something like |
OK. But that means extra work for redoing templates in different environments that might have different defaults... Anyway, that proposal would also mean we will have to build non-GNU envsubst for all supported platforms manually. I'm leaving it open, but it's definitely not on top of a things to implement. |
I'm also interested in this capability. It can simplify image configuration a lot |
I would love to have this feature as well! The idea is to have templates where most of the variables are optional, so you can run the application with little configuration, but still can be highly configurable if needed. |
The problem: by default nginx in docker uses GNU envsubst that can't proceed variables with default values like
${var:-DEFAULT}
. We can use a8m envsubst or stephenc envsub instead, the first one has already had a prebuilded binary for x86_64 arch and it can be easily builded with docker and golang in a separate build stage.The text was updated successfully, but these errors were encountered: