2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-02-25 16:17:58 +00:00

make INVENTREE_WEB_PORT more usefull (#11352)

* make INVENTREE_WEB_PORT more usefull

* Update contrib/container/docker-compose.yml

Co-authored-by: Philipp Fruck <dev@p-fruck.de>

* revert change

* Fix indentation for environment variable in docker-compose

---------

Co-authored-by: Philipp Fruck <dev@p-fruck.de>
This commit is contained in:
Matthias Mair
2026-02-20 11:10:49 +01:00
committed by GitHub
parent 3910cc5a50
commit 782c765685
3 changed files with 5 additions and 1 deletions

View File

@@ -12,6 +12,7 @@ INVENTREE_TAG=stable
INVENTREE_SITE_URL="http://inventree.localhost" INVENTREE_SITE_URL="http://inventree.localhost"
#INVENTREE_SITE_URL="http://192.168.1.2" # You can specify a local IP address here #INVENTREE_SITE_URL="http://192.168.1.2" # You can specify a local IP address here
#INVENTREE_SITE_URL="https://inventree.my-domain.com" # Or a public domain name (which you control) #INVENTREE_SITE_URL="https://inventree.my-domain.com" # Or a public domain name (which you control)
INVENTREE_WEB_PORT=8000
# InvenTree proxy forwarding settings # InvenTree proxy forwarding settings
INVENTREE_USE_X_FORWARDED_HOST=True INVENTREE_USE_X_FORWARDED_HOST=True

View File

@@ -2,6 +2,7 @@
# The following environment variables may be used: # The following environment variables may be used:
# - INVENTREE_SITE_URL: The upstream URL of the InvenTree site (default: inventree.localhost) # - INVENTREE_SITE_URL: The upstream URL of the InvenTree site (default: inventree.localhost)
# - INVENTREE_SERVER: The internal URL of the InvenTree container (default: http://inventree-server:8000) # - INVENTREE_SERVER: The internal URL of the InvenTree container (default: http://inventree-server:8000)
# - INVENTREE_WEB_PORT: The port on which the InvenTree web server listens (default: 8000)
# #
# Note that while this file is a good starting point, it may need to be modified to suit your specific requirements # Note that while this file is a good starting point, it may need to be modified to suit your specific requirements
# #

View File

@@ -76,12 +76,14 @@ services:
container_name: inventree-server container_name: inventree-server
# Only change this port if you understand the stack. # Only change this port if you understand the stack.
expose: expose:
- 8000 - ${INVENTREE_WEB_PORT:-8000}
depends_on: depends_on:
- inventree-db - inventree-db
- inventree-cache - inventree-cache
env_file: env_file:
- .env - .env
environment:
INVENTREE_SERVER: http://inventree-server:${INVENTREE_WEB_PORT}
volumes: volumes:
# Data volume must map to /home/inventree/data # Data volume must map to /home/inventree/data
- ${INVENTREE_EXT_VOLUME}:/home/inventree/data:z - ${INVENTREE_EXT_VOLUME}:/home/inventree/data:z