From 02f2942ed1d1eade2ea086d6c3b4a822fe9eaba0 Mon Sep 17 00:00:00 2001 From: Benjamin Webb <40066515+webb-ben@users.noreply.github.com> Date: Mon, 23 Dec 2024 10:12:44 -0700 Subject: [PATCH 1/2] Fix port mapping `CONTAINER_PORT` sets the internal port, NLDI_URL sets the URL with the external port --- docker-compose.yml | 2 +- start_nldi_server.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 752376a..85c35e9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -29,7 +29,7 @@ services: - "8080:80" environment: NLDI_PATH: /api/nldi - NLDI_URL: http://localhost:80/ + NLDI_URL: http://localhost:8080/ NLDI_DB_HOST: nldi-db NLDI_DB_PORT: 5432 NLDI_DB_NAME: nldi diff --git a/start_nldi_server.sh b/start_nldi_server.sh index ba44365..07f4680 100755 --- a/start_nldi_server.sh +++ b/start_nldi_server.sh @@ -13,7 +13,7 @@ export NLDI_CONFIG="${NLDI_HOME}/local.source.yml" #export SCRIPT_NAME=${NLDI_PATH:=/} CONTAINER_NAME=${CONTAINER_NAME:=nldi} CONTAINER_HOST=${CONTAINER_HOST:=0.0.0.0} -CONTAINER_PORT=${CONTAINER_PORT:=8080} +CONTAINER_PORT=${CONTAINER_PORT:=80} WSGI_WORKERS=${WSGI_WORKERS:=4} WSGI_WORKER_TIMEOUT=${WSGI_WORKER_TIMEOUT:=6000} WSGI_WORKER_CLASS=${WSGI_WORKER_CLASS:=gevent} From 5a58b5ea0353562ac5f0cb0b19d99d507b63a45c Mon Sep 17 00:00:00 2001 From: Benjamin Webb <40066515+webb-ben@users.noreply.github.com> Date: Mon, 23 Dec 2024 10:14:03 -0700 Subject: [PATCH 2/2] Default to port 8080 --- docker-compose.yml | 2 +- start_nldi_server.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 85c35e9..1fe2fe3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -26,7 +26,7 @@ services: context: . container_name: nldi-py ports: - - "8080:80" + - "8080:8080" environment: NLDI_PATH: /api/nldi NLDI_URL: http://localhost:8080/ diff --git a/start_nldi_server.sh b/start_nldi_server.sh index 07f4680..ba44365 100755 --- a/start_nldi_server.sh +++ b/start_nldi_server.sh @@ -13,7 +13,7 @@ export NLDI_CONFIG="${NLDI_HOME}/local.source.yml" #export SCRIPT_NAME=${NLDI_PATH:=/} CONTAINER_NAME=${CONTAINER_NAME:=nldi} CONTAINER_HOST=${CONTAINER_HOST:=0.0.0.0} -CONTAINER_PORT=${CONTAINER_PORT:=80} +CONTAINER_PORT=${CONTAINER_PORT:=8080} WSGI_WORKERS=${WSGI_WORKERS:=4} WSGI_WORKER_TIMEOUT=${WSGI_WORKER_TIMEOUT:=6000} WSGI_WORKER_CLASS=${WSGI_WORKER_CLASS:=gevent}