From aa2f5e330ae0317327aeab43f03986837ea9f410 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Wed, 24 May 2023 01:05:16 +0200 Subject: [PATCH] Make nginx more clear that changing the port is 'dangerous' (#4880) * Make nginx more clear that changing the port is 'dangerous' See https://github.com/inventree/InvenTree/issues/4859#issuecomment-1560025566 * also add note to prod docker-compose --- docker/production/docker-compose.yml | 4 ++++ docker/production/nginx.prod.conf | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docker/production/docker-compose.yml b/docker/production/docker-compose.yml index e691ed7fa2..c8fdeb251f 100644 --- a/docker/production/docker-compose.yml +++ b/docker/production/docker-compose.yml @@ -73,6 +73,10 @@ services: container_name: inventree-server # If you wish to specify a particular InvenTree version, do so here image: inventree/inventree:${INVENTREE_TAG:-stable} + # Only change this port if you understand the stack. + # If you change this you have to change: + # - the proxy settings (on two lines) + # - only change the exposed port - eg `1338:8000` if you want to expose the server on port 1338 expose: - 8000 depends_on: diff --git a/docker/production/nginx.prod.conf b/docker/production/nginx.prod.conf index 8725a1453c..96cc0dd8b6 100644 --- a/docker/production/nginx.prod.conf +++ b/docker/production/nginx.prod.conf @@ -24,8 +24,7 @@ server { proxy_buffering off; proxy_request_buffering off; - # Change 'inventree-server' to the name of the inventree server container, - # and '8000' to the INVENTREE_WEB_PORT (if not default) + # Do not touch this unless you have a specific reason - this and the docker-compose need to match proxy_pass http://inventree-server:8000; }