Skip to content

Set vars from project.clj #19

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

Closed
rosejn opened this issue Mar 16, 2015 · 3 comments
Closed

Set vars from project.clj #19

rosejn opened this issue Mar 16, 2015 · 3 comments

Comments

@rosejn
Copy link

rosejn commented Mar 16, 2015

We use nomad everywhere with great success, but one addition that would be helpful is to support setting configuration vars on a per profile basis in the project.clj. The environ library does this well by using a leiningen plugin, but it doesn't have the nice config file functionality of nomad. For now I'll use both, but it seems like with this addition nomad would be the only needed config/environment related library.

@jarohen
Copy link
Owner

jarohen commented Mar 17, 2015

Hi Jeff,

One solution I've thought about for this for a while (but wasn't sure if anyone would use!) is if Nomad could pull through JVM system properties into the config map, in a similar way to environment variables - these could be set in your project.clj, and overridden in the various profiles. The benefits of this would also be that we wouldn't need a separate lein plugin and that, if the project was built, deployed and run without Leiningen, config could still be passed as '-D' parameters. Would this work for your use case?

James

@jarohen
Copy link
Owner

jarohen commented Mar 18, 2015

Just deployed 0.7.1-SNAPSHOT, with this change - you can refer to a JVM property as follows:

{:config-var #nomad/jvm-prop "yourapp.property"
 :other-key "value"}

Let me know what you think :)

James

@rosejn
Copy link
Author

rosejn commented Mar 19, 2015

Cool, I'll try it out.  Thanks!

On Wed, Mar 18, 2015 at 3:37 PM, James Henderson [email protected]
wrote:

Just deployed 0.7.1-SNAPSHOT, with this change - you can refer to a JVM property as follows:

{:config-var #nomad/jvm-prop "yourapp.property"
 :other-key "value"}

Let me know what you think :)

James

Reply to this email directly or view it on GitHub:
#19 (comment)

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

No branches or pull requests

2 participants