3 ms·
My major pain point was that I had big JSON files inside my .env files. We use Cloud Foundry at work and it uses plenty of these for configuration. I wrote a s
by brodo 4y ago
My major pain point was that I had big JSON files inside my .env files. We use Cloud Foundry at work and it uses plenty of these for configuration.
I wrote a small Rust tool called ‘json_env’[0] to read JSON files and supply them as ENV vars to a program. I’m working on it in my free time and eventually want to also replace direnv with it. TOML and YAML support is also planned.
[0] https://github.com/brodo/json_env https://github.com/brodo/json_env
- sph 4y agoBut why? Is it not easier to store the JSON as file and have an env variable that points to it? JSON as env value is utter madness.
- brodo 4y agoHaving no config files is part of the 12 factors [0]. All cloud providers I have worked with adhere to this. [0]: https://12factor.net https://12factor.net
- sph 4y ago12factor doesn't mandate that you put the entirety of a JSON file into a single variable. That is what you implied with your original comment.