[erlang-questions] recommended ways to pass config to a dep app
Fri Nov 16 16:49:18 CET 2012
I'd stick with what is working as well!
But just a point of clarification -- releases are hard for release
engineers, not for end users. I deploy all Erlang projects as releases
for that reason. You get a nice distribution that can be configured
trivially with a single config file and further refined with command
There is a theoretical downside to asking users to edit Erlang term
files. I treat this as a UI problem to config and so have used
converters from, say YML, to Erlang config files that are run at
startup so users don't get into that layer. But since the Erlang init
process is so central to Erlang itself, I prefer to leverage it rather
than roll something different.
But understood :)
On Fri, Nov 16, 2012 at 9:40 AM, Max Lapshin <> wrote:
> Thank you, guys, a lot, but I'm not going to return to releases =)
> erlyvideo is just a plain unix software, like apache or sendmail, that is
> installed by people, that are hearing about erlang for the first time.
> They can modify only one file in /etc/, so I need to read it before startup.
> But there may not be this file, so I need to look for in in other place.
> I really don't see any use in releases for me, so my way of configuring
> applications inside erlang node is very, very convenient and it is
> _working_. Working in _my practice_.
> On Fri, Nov 16, 2012 at 7:30 PM, Garrett Smith <> wrote:
>> On Fri, Nov 16, 2012 at 9:19 AM, Max Lapshin <>
>> >> IMO application:start/1 is also a bad smell outside dev/test modes.
>> >> When you deploy as an Erlang release, applications are started by the
>> >> init system process.
>> > I've tried to use releases in erlyvideo for a year and totally refused
>> > from
>> > then and I don't see even a single reason for me to return back to them.
>> > So,
>> > there is nothing bad in application:start/1, it is a good way to deploy
>> > and
>> > launch system.
>> Understood. But there is a payoff in getting this to work. Understood
>> though :)
>> I want to set aside some time to check out Eric Merrit's relcool (I
>> came up with the name :)
>> > There is a nice startup function now in erlyvideo, that does all setup
>> > (which differs for runtime and for tests), it loads
>> > all data from config file.
>> Reinventing the wheel, but that's cool - it's not a complicated wheel.
>> > application config file is a bad place for configuring your application,
>> > because it generates nowadays from app.src and exists somewhere in
>> > /usr/lib/...
>> > configuration file lives in /etc/
>> You're confused. App config has nothing to do with app.src and
>> certainly lives in /etc/
>> It's the file you pass here:
>> erl -config CONFIG
More information about the erlang-questions