New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement: allow paperless to run in read-only filesystem #5596
Enhancement: allow paperless to run in read-only filesystem #5596
Conversation
Hello @hegerdes, thank you very much for submitting this PR to us! This is what will happen next:
Please allow up to 7 days for an initial review. We're all very excited about new pull requests but we only do this as a hobby. |
This seems highly specific and not much upvoted. What is the purpose? |
Mixing code, user-data and runtime data (logs, pids) in a single directory can lead to unintended effects. Having the option to separate them makes deployments way more flexible. I have no problem you want to make this an undocumented/unsupported feature. The shell script behaves exactly the same if |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #5596 +/- ##
==========================================
- Coverage 96.57% 96.49% -0.09%
==========================================
Files 401 400 -1
Lines 15829 15729 -100
Branches 1227 1203 -24
==========================================
- Hits 15287 15177 -110
- Misses 538 548 +10
Partials 4 4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion or issue for related concerns. See our contributing guidelines for more details. |
Proposed change
Closes #4020
Type of change
Checklist:
pre-commit
hooks, see documentation.What changed
Currently it is not possible to run paperless-ngx in a read-only filesystem/container. On startup is writes
supervisord
log and pid's in the projects source files. Python also writes binary cache files in the__pycache__
folder. The creation of the__pycache__
folder can be disabled or changed. One way is to set thePYTHONPYCACHEPREFIX
environment variable. All persistent data stores can also either be changed via env's and most people use volume or bind mounts.For additional security and for idempotence you might want to run the container in read-only to prevent any unwanted changes. This PR enables it by also allowing to change
supervisord
log and pid file location via thePAPERLESS_SUPERVISORD_WORKING_DIR
env.Example: