Closed 71GA closed 3 years ago
Ah it wirked if I modified gunicorn.conf.py
line:
bind = "127.0.0.1:8000"
like this:
bind = "<server's public ip>:8000"
Weird that later works and former doesn't. It is also weird that at this point, Inventree looks horrible (check the screenshoot). Is it normal to look horible like this at this point in tutorial? I am using version 0.5.0.
The above screenshot is not normal behaviour. It shouldn't look this way. I already finished the tutorial, but look hasn't changed.
In your config file, you have set debug=False
This means that the /static/
and /media/
files will not be served by the gunicorn web server - see notes here
In a production setup (i.e. debug=False
) you will need to serve the media and static files separately.
If you set debug=True
you should find that the web interface looks "nice" again (as the static files include the CSS files).
This is exactly what I configured.
@71GA what webserver are you using? Please share the config for the section where inventree is configured?
I fixed it back to debug=True
and it works.
I fixed it back to
debug=True
and it works.
I really think this is / was a issue with the Webserver settings. The gunicorn itself should not be served directly but through a proper proxy or webserver. Maybe take a look if that setup works well.
As a starting point, you could have a look at how it is configured in the docker setup. It puts gunicorn behind an nginx proxy which also serves media and static files with the correct permission management.
Setting up Inventree on a bare metal server is a non trivial process!
@71GA I'm going to close this issue out, if you still have any question please feel free to re-open it.
I did all installation steps here and now started the Inventree with a Gunicorn from within my "python virtual environment":
I can see that it is using the port
8000
:But when I visit
http://<server's public ip>:8000
with my browser there is nothing there.My
gunicorn.conf.py
configuration is as follows:And my
config.yaml
is:What could I possibly be missing? Therefore I amstuck at this official tutorial step.