I couldn't find anything in the docs. In the examples, only /priv/static is ignored. Is there anything that would go into /priv/ and should be under version control?
#Using lustre_dev_tools should I add /priv/ to .gitignore?
1 messages · Page 1 of 1 (latest)
priv is the home for files that are not source but are to be distributed with your application
It’s up to you what in there you want to check it
Typically most things in there would be checked in
Ok, thanks!
So you would also check in /priv/static/app.mjs? That's my lustre app compiled to JS, right?
So it's a bit like checking a build result into Git. Typically I wouldn't do that.
I personally would opt to not check it in and regenerate it as part of the deployment process, but it’s up to you and what you want your process to be
It's also pretty big.
Sure.
As I said I'm very new, so it's not clear to me what is what. I know it's ultimately up to me 🙂
So say I have some CI/CD to deploy my app.
Should I ignore all of /priv/, only /priv/static or only /priv/static/app.mjs ?
It’s up to you
Most the time you would want to have other things in priv also, but you may not have anything else in there
Other things like what?
See here
In a web application perhaps images, stylesheets, that sort of thing
But it could be literally anything
Aha! Makes sense.
Any file that isn’t code that your application uses at runtime
I think the name "priv" is a bit confusing.
I agree, aye
I think originally it was short for “private”? Can’t quite remember.
A lot of this stuff would probably be different if it was made today. Programming was different in the 80s
Yup it’s the BEAM project structure
The VM has a bunch of interfaces that applications implement. The Gleam build tool largely handles it all for you
I found this from https://www.erlang.org/doc/system/applications.html :
The priv directory holds assets that the application needs during runtime. Executables should reside in priv/bin and dynamically-linked libraries should reside in priv/lib. Other assets are free to reside within the priv directory but it is recommended they do so in a structured manner.
The name is a bit weird, but otherwise it makes sense.
Probably I should read the deployment chapters from Lustre documentation to better understand what fits where. Thank you!