Improve Docker Mount Workflow
Currently the user needs to create a data folder to map to /app/data inside the container and give user 1000 (the flatnotes user) permission to read/write in it. If they don't do this then Docker creates the folder with ownership assigned to root. If that happens, flatnotes doesn't have the ability to write to the directory and crashes.
Perhaps I need to initially run as root, update the folder ownership and then switch to the flatnotes user to run the app.
Suggestions from Reddit:
You might need to make an env for the user and group ID.
you can use something like su-exec or s6-overlay to do user masking. do all your startup/init as root and then the last action is to start the app as the env provided uid/gid.
On the same topic you should also "remove" the /app part of the path the user needs to map to. I believe the convention is to expose only single level directory for mapping.
@norsemanGrey - This makes sense and is certainly the convention I've seen for linuxserver.io containers. I'll keep this in mind.
Both of these suggestions are now implemented in v3.0.0.