Comments (3)
Hi @langimike
Thank you for opening this discussion.
The thing is, Papermerge used to have a configuration system very similar to django environ that you mentioned. To be honest, I really love that approach (.env file + read settings from environment variables)!
But in practice, those approaches (dotenv, django environ) have drawbacks.
One drawback (and least problematic) is that .env file limits variables syntax. I encountered this issue when I introduced metadata plugins. Metadata plugins are declared as list. IMHO python syntax is very user friendly in that regard - while .env syntax, well, it depends...
Another drawback, which I find as very is serious one - it is when it comes to deploying Papermerge/Django project in production under Apache (mod_wsgi + apache2). Passing environment variables from under apache is, to say the least - not as flexible as compared to deploying from nginx + gunicorn (or even docker containers). Apache Web server has little bit weird way of working with environment variables and it does not pass to django application variables as say gunicorn does.
So, my point is that I won't mess around with configuration system at this moment - as it is flexible enough to work in different environments (development, test, production: gunicorn, uwsgi, apache2 + mod_wsgi).
from papermerge.
I definitely understand your points.
I think, it's primarily a matter of taste, because for the first drawback django-environ supports all sorts of python datatypes and the second drawback comes from one's preferred way of deployment (apache2+mod_wsgi vs. nginx+uwsgi or nginx+daphne).
My ideas/suggestions source in me trying to configure database settings (host, user, password) within the containers. The only way I found to override them, is mounting modified app.production.py and worker.production.py to /opt/app/config/settings/production.py.
But don't mind, I got it running.
Thank you!
from papermerge.
Great that you have Papermerge up and running!
I will close this issue then.
Thank you!
from papermerge.
Related Issues (20)
- User with role can view, but also upload documents
- Chinese pdf file upload is not supported
- OCR is not being triggered / is not working at all.
- Papermerge 3.0 Status HOT 1
- Small talk and feature request
- Automates is not available HOT 2
- Drag and drop between two panels doesn't work HOT 3
- Update setup guide from V1.5.5 to latest
- Docker, Error loading MySQLdb module: Did you install mysqlclient? HOT 2
- Error: docker run papermerge/papermerge backup
- [Discussion] Integrating Papermerge in a third party app HOT 4
- [UI] Modals - Enter/Esc keys
- [UI] Pagination has no Effect HOT 1
- Share your personal setup? HOT 1
- Error "Preview not ready yet" when trying to preview uploaded PDF via REST API HOT 4
- [UI] Extracting pages shows wrong node list on the target HOT 1
- [UI] Context Missing "Extract Pages" entry HOT 1
- [UI] Missing Entry in Context Menu HOT 1
- [UI][Context Menu] Rename "Move" to "Move Document"
- [UI] Refresh Folder
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from papermerge.