Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where does the `priv` directory belong in mix umbrella projects

As I understand it any artifact that is needed in a release should be put in a priv directory. In the case of an umbrella project should there be a single priv directory at the umbrella level or one for each app?

Also how do you look up the pathname for the priv directory?

like image 294
Peter Saxton Avatar asked Nov 20 '16 12:11

Peter Saxton


1 Answers

priv directory is part of an OTP application layout. Since an umbrella in itself is not an OTP application it doesn't have the priv directory - the actual applications do, so each one gets it's own priv.

You can access files in the priv directory using:

Application.app_dir(:app_name, "priv/path/to/file")
like image 134
michalmuskala Avatar answered Sep 21 '22 19:09

michalmuskala