Open Ulli2k opened 5 years ago
Any ideas?
How do you deploy? Docker, nginx, gunicorn, django-development server, [...]? Which file(s) do not get loaded (you can see via the developer network console, in firefox via ctrl-shift-e, chrome no idea but should also be there)? Do you get logged errors in the werserver (e.g. if you use systemd and nginx journalctl --boot -u paperless-webserver nginx
)?
Did you run migrations after updating (python ./manage.py migrate
)?
I can not reproduce css not loading, i.e. it's not that by accident the css file got deleted or something like that.
In chrome the developer console can be toggled via ctrl-shift-i or F12. Use the network tab there and press F5, since it only shows information gathered since the console was opened.
it looks like this problem (possible workrounds available, too): https://github.com/danielquinn/paperless/issues/167
I do not use docker. I just installed it via git pull on a linux 64 system.
I solved the issue based on the workaround in issue #167 and modified my systemctl service file
ExecStart=/usr/bin/python3 /home/paperless/paperless/src/manage.py runserver --insecure 0.0.0.0:8000
Would make sense to add this in the repository, right?
I'm only on my 4th day of using paperless, ran into the same issue as well and wanted to give you the hint about the insecure option.
After further reading the available documentation and django docs, I would guess that in general django isn't meant to deliver static files in a productive environment. https://docs.djangoproject.com/en/2.1/howto/static-files/deployment/
That is in line with the paperless documentation for setup: https://github.com/danielquinn/paperless/blob/master/docs/setup.rst
Nevertheless I agree with you that a hint or clarification (use debug or --insecure) for the purpose of a first installation, for testing or even for deployment in a private network would be more convinient.
I'll try to contribute this additional hint the next days.
I think it would be best to add some "canonical deployment", so that starting paperless for evaluating or for very simple personal usage is just a simple CLI call. This needs some kind of server, but django makes it pretty clear that its debug/insecure mode is not the right choice for a default usage.
All "production quality" webservers I know (nginx, apache, caddy, ...) are native programs and bundling one of these with paperless would make packaging much more difficult. Also advanced users would surely prefer their own choice of webserver/stack (an (system) nginx as a frontend for another (paperless) nginx is surely possible but doesn't really have any benefits).
A high quality pure python webserver e.g. gunicorn does not have these problems. Existing users probably already use a WSGI server like gunicorn or would profit from using one (increased security and performance). Unfortunately nearly all pure python webservers only limit themselves to run WSGI apps and not bother with static files. The only python webserver I could find that explicitly lists static files as a purpose and which isn't abandoned is whitenoise.
In my opinion we could document and propose three type of installation:
I believe that would cover most usage.
After the last git pull I have a damaged Webinterface. Any proposals to fix this?