Hi Dan - it's possible to load configuration from environment variables as 
of version 0.0.2 (released today) - you can now put [::env :env-var-name]in 
your configuration to look up the 'ENV_VAR_NAME' environment variable. More 
info in the env-vars section 
<https://github.com/james-henderson/phoenix#config-in-environment-variables> of 
the README.

Re: tagged literals: I'm pretty sure that's possible too - I can't see why 
it wouldn't honour readers that you put into your data-readers.edn file 
(haven't tried this out yet though), but there's currently no way to pass 
custom readers to Phoenix directly. I think this is one of the downsides of 
going for a plugin+library approach rather than just a library - I've split 
it out today so that it is possible to call the library directly, but it 
could still do with being a bit more flexible, I think!

James

On Sunday, 25 January 2015 13:10:34 UTC, Dan Kersten wrote:
>
> Hi James,
>
> This looks nice. I do have one question: is it possible to load parts of a 
> configuration from environment variables?
>
> Eg, in your "location-aware configuration" example, lets say I wanted to 
> specify the database user and pass configuration options as you do for the 
> dev configurations, but I want to load them from environment variables in 
> the prod configuration?
>
> Or, better yet, if it were pluggable (through tagged literals maybe?), so 
> that I can choose where to load configuration from, eg, zookeeper or etcd). 
>
> On Sat Jan 24 2015 at 3:20:13 PM James Henderson <ja...@jarohen.me.uk 
> <javascript:>> wrote:
>
>> Hi all,
>>
>> I've just released Phoenix - a library for declarative configuration and 
>> wiring of Component-based systems. Phoenix came out of a number of 
>> discussions at ClojureX, thank you to all involved for their suggestions 
>> and feedback :)
>>
>> https://github.com/james-henderson/phoenix
>>
>> If you’ve written a traditional Component-based system, you’ve probably 
>> experienced having to create and maintain a plethora of ‘system.clj’, 
>> ‘dev.clj’, ‘user.clj’ etc type namespaces in order to wire-up the system, 
>> set up configuration-based switches, and duplicate the code to 
>> start/stop/reload the system. Phoenix removes the need for all of this, 
>> replacing it with one (or more, if you choose) EDN declaration of how your 
>> system should be wired up. It should also compose well with any other 
>> Components you (or anyone else) may have already written.
>>
>> For a sample project, you can run 'lein new phoenix-webapp <your-project>', 
>> then 'cd <your-project>' and 'lein dev'. Once the nREPL is up, running '
>> (phoenix/reload!)' will stop the system, reload any namespaces, and 
>> restart the system.
>>
>> Phoenix is just one possible way of wiring up such a system - I 
>> understand that there are a fair few ideas floating around out there at the 
>> moment! I'd be really interested to hear your thoughts - whether it be 
>> 'this is mostly right, but I wouldn't do that part like that', or 'you've 
>> gone about this completely the wrong way, because ...' - let me know!
>>
>> Cheers,
>>
>> James
>>
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com 
>> <javascript:>
>> Note that posts from new members are moderated - please be patient with 
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com <javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to clojure+u...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to