[erlang-questions] Is priv a good place to store data?
Jesper Louis Andersen
Wed Jan 13 20:38:16 CET 2016
On Wed, Jan 13, 2016 at 8:16 PM, Lyn Headley <> wrote:
> I am building an app which will need to store some data in files. I am
> wondering if others use the priv directory for this, or whether they
> use another place, perhaps somewhere outside of the application tree
>From experience: keep the static artifact away from the dynamic data
whenever you can. It makes software upgrades much simpler since you can
install another artifact next to the one you already have, move a symbolic
link, and run it against the data, kept separate. It simplifies
partitioning, it simplifies backup, and you can lock down writing to the
tree for the user running your release.
So my usual solution is: use priv for read-only data the given application
is using, and use the application configuration environment to pick up the
storage area for dynamic data.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions