UNOFFICIAL/UNSUPPORTED Guide to using Inventree with Nginx Proxy Manager in Docker #9052
RedEchidnaUK
started this conversation in
General
Replies: 1 comment 1 reply
-
Let’s be clear: we do not support proxy setups outside of the ones we provide. Running caddy is very efficient and ensures your instance does not break. We only test that setup and will not ensure this guide keeps working. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've seen a few requests from people asking about using Nginx Poxy Manager (NPM) rather than the supplied proxy when running Inventree in Docker. Which is understandable, as running another proxy seems unnecessary, and a proxy in front of another proxy is just another layer of complication (although it does appear to work).
Warning
This is NOT a solution supported by the developers, and if you have issues with it, please DO NOT ask them for support.
Ask for support on this discussion and I or someone else may be able to help.
Now the disclaimer is out of the way, below is a guide on how to make it all work, and when I say work, I mean it seems to be working for me, but I'm not an Nginx expert so YMMV. If nothing else, this may provide some inspiration or guidance.
Prerequisites
inventree-server
containerNPM Compose Modifications
The Inventree Proxy doesn't just proxy requests to the Inventree Server, it also serves static files. Therefore, you need to add a volume to the NPM Compose file so that NPM can be configured to serve the files.
Add a line under the
volumes
section to mount the Inventree data files inside NPM:The example above maps
/docker/inventree
on the host to/inventree-data
in the NPM container. Note that host path is the same as the Inventree environment variableINVENTREE_EXT_VOLUME
. If you change the location of the Inventree data inside the NPM container, you will have to modify the NPM advanced configuration shown later.Inventree Compose Modifications
Comment out all of the
inventree-proxy
sections:Configure NPM
Create a new proxy in NPM.
Details Tab
http
with a forward hostname ofinventree-server
on a port of8000
Websockets
Custom locations Tab
/
that forwards to a scheme ofhttp
with a forward hostname ofinventree-server
on a port of8000
Note: The Inventree Nginx config has other headers set, but NPM provides that config by default so it isn't required.
SSL Tab
Force SSL
Advanced Tab
Beta Was this translation helpful? Give feedback.
All reactions