Distillery release not working in a read-only directory

Hello everyone I am trying to package a Distillery release into a snap. I see that the $SNAP folder is read-only which is why I am getting the following error.
cp: cannot create regular file '/snap/my-app/x1/var/start_erl.data': Read-only file system
How can I configure distillery so that it uses $SNAP_DATA for write tasks instead of $SNAP?

Thanks! :smiley:

1 Like

I do not remember having had similar problems on nixOS, which installs into a RO FS as well, though I used mix release rather than distillery there.

Perhaps that makes the important difference?

1 Like

Yes both rebar3 and mix release can be configured to run on RO FS but I can’t use any of those. I need to know how Distillery can be configured so that it generates all output files on another folder preferably $SNAP_DATA at runtime.