How do the Phoenix experts handle files / filesystem interactions in applications deployed with “releases”? Do I understand correctly that the development directory tree no longer applies in case of “released” application?
Yes, they’re completely different.
Using Application.app_dir/2
for things relative to the application folder (almost exclusively priv/
, unless you’re adding different folders) or absolute paths.
1 Like
Thank you @LostKobrakai! Quick and to the point as always
Just a small follow-up: in case of “release” of an application named PhxApp
the app-dir
is going to be the one inside _build/prod/lib/phxapp
, right?
With default settings yes, this is fully configurable however.
Personally I tend to name all releases with the same name, so I can just reuse all CI/CD scripts without any modifications :).
1 Like