How do I get inventree to use a non-standard TCP? #12538
|
I cannot seem to win. My setup
Trying to setup as follows: Compose file: and the ENV file: This will startup and will only be accessible on port 443 -> https://XXX-XXX.duckdns.org:443 I really want to get this to run on, lets say, port 5143. I just do not want any of this application (including the proxy) to run on ports 80 and 443. I am sort of new to docker. It is likely I am missing something thanks |
Replies: 5 comments 6 replies
|
I am converting my HomeNAS from Synology to TrueNAS. I do have a NGINX running also. It uses 80 and 443. I have stopped that to run/start inventree. |
|
For a single HTTP endpoint on port 5143, use: INVENTREE_SITE_URL="http://192.168.100.10:5143"
INVENTREE_HTTP_PORT=5143
INVENTREE_WEB_PORT=8000Then change the proxy mapping to: ports:
- "${INVENTREE_HTTP_PORT}:${INVENTREE_HTTP_PORT}"Remove the HTTPS mapping if you do not want the container to publish port 443. Your current After changing it, verify the resolved configuration with: docker compose config
docker compose up -d --force-recreate inventree-server inventree-proxy |
|
Oh man. This sounds super helpful. I’ll certainly be testing when I get a chance I’m still learning here and it’s be difficult to find the right “details” Thanks. If it works I’ll come back and mark solved |
|
I think my issue with trying to use HTTPS://xxx:5134 is that CADDY expects to use well known ports (443) for the Let's Crypt cert and is failing |
|
I have made some improvements to the docs around this - #12588 |
INVENTREE_WEB_PORTis the internal Gunicorn port, so leave it at8000. The public port is controlled by Caddy and the Docker port mapping.For a single HTTP endpoint on port 5143, use:
Then change the proxy mapping to:
Remove the HTTPS mapping if you do not want the container to publish port 443.
Your current
https://...site URL makes Caddy serve HTTPS. With the explicithttp://...:5143address, Caddy listens on port 5143 inside the container, so the mapping must be5143:5143.After changing it, verify the resolved configuration with: