question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Converting environment variables into config file

See original GitHub issue

Just thinking that depending on environment variable for configuration can be bit hard due to continuous change of servers. Everywhere I need to setup cdxgen I need to set environment variables again. Wouldn’t it be easy to maintain config.json file with default values and we can modify it anytime?

We can provide the path to config file over the cli arguments. Thus making it independent of that server setup.

As mentioned in https://github.com/AppThreat/dep-scan/issues/57, while setting up the sbom container it’s hard to assign environment variables to container for everytime we need to modify the values. Also looking forward to this sbom server, would love to contribute to it if the commands are already available.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
alexkhudyshkincommented, Jun 25, 2022

Totally agree with this enhancement. It would also be great if we could change repository urls in config, like const NPM_URL and const MAVEN_CENTRAL_URL. Some companies use proxy repositories for that and restrict direct access to original repository url.

0reactions
kakumanivrncommented, Sep 16, 2022

Since there is active discussion going on this thread, closing it for now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use environment variables in the configuration - Elastic
You can use environment variable references in the config file to set values that need to be configurable during deployment. To do this,...
Read more >
JohnStarich/env2config: Convert environment variables to ...
Convert environment variables to configuration files. Great for containerizing existing projects that rely on config files. Some projects just don't support ...
Read more >
Want to use env variables in that config file? Well, you can ...
So what I'm trying to say is we can cheat. We can use envsubst like a preprocessor to create our config files based...
Read more >
Solved: Setting env vars in pipeline in configuration file
Solved: I'm aware of the possibility to add pipeline environment variables and secret through the Bitbucket GUI. However I want to set my....
Read more >
Using Environment Variables in Python for App Configuration ...
Here are some examples of using environment variables to configure a Python script or application: Set FLASK_ENV environment variable to " ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found