Skip to content
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

Ship envsubst with the Docker image to facilitate TOML templating #3974

Merged
merged 2 commits into from
Sep 22, 2022

Conversation

neysofu
Copy link
Member

@neysofu neysofu commented Sep 22, 2022

envsubst takes care of all foreseeable templating needs that we might face for TOML configuration files.

From all envsubst implementations that I could find, I selected https://github.com/a8m/envsubst because it seemed to be the most complete and well adopted. More fully-fledged templating engines like http://www.confd.io/ are interesting but probably overkill.

Here's an example of a configuration pattern that envsubst can deal with, while our current variable expansion logic can't:

[chains.${CHAIN_0}]
shard = "${SHARD_0}"
provider = [ { label = "${CHAIN_0}", url = "${CHAIN_RPC_0}", features = ["${CHAIN_0_FEATURES}"] } ]

Closes #3946.

@evaporei evaporei self-requested a review September 22, 2022 21:17
Copy link
Contributor

@evaporei evaporei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@neysofu neysofu merged commit 8ce2d61 into master Sep 22, 2022
@neysofu neysofu deleted the filippo/envsubst branch September 22, 2022 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make the config.toml file more modular by expanding env vars inside it
2 participants