From 40992568271300a05d487d85847e239604423878 Mon Sep 17 00:00:00 2001 From: doublebyte1 Date: Wed, 25 Jun 2025 13:44:29 +0100 Subject: [PATCH 1/4] - Added information about other environmental variables that are available in the docker image --- docs/source/running-with-docker.rst | 32 +++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/docs/source/running-with-docker.rst b/docs/source/running-with-docker.rst index a1094fef4..e9af329de 100644 --- a/docs/source/running-with-docker.rst +++ b/docs/source/running-with-docker.rst @@ -102,6 +102,38 @@ The base Docker image supports two additional environment variables for configur To learn more about the Admin API see :ref:`admin-api`. +3. **`CONTAINER_HOST`**: + This variable sets the listening address for incoming connections. Normally the server is listening on localhost (the default), but other values are also possible. + + .. code-block:: bash + + docker run -p 5000:80 -e CONTAINER_HOST=192.168.0.7 -it geopython/pygeoapi + +4. **`CONTAINER_PORT`**: + This variable sets the listening port for incoming connections. The default port is `80`; in this example, we change it to 5001. + + .. code-block:: bash + + docker run -p 5000:5001 -e CONTAINER_PORT=5001 -it geopython/pygeoapi + +5. **`WSGI_WORKERS`**: + + This variable sets the number of workers used by the `gunicorn server `_, the default being 4. + For performance reasons, `it is not recommended to use a high number of workers `_ . + + .. code-block:: bash + + docker run -p 5000:80 -e WSGI_WORKERS=10 -it geopython/pygeoapi + +6. **`WSGI_WORKER_TIMEOUT`**: + + Gunicorn workers silent for more than the seconds set by this variable are killed and restarted. The default value is 6000. + + .. code-block:: bash + + docker run -p 5000:80 -e WSGI_WORKERS=10 -it geopython/pygeoapi + + You can read more about this and other gunicorn settings in the `official documentation `_ Deploying on a sub-path ----------------------- From 37a3ff3640b700f66ea690a8916fbb8740692c6e Mon Sep 17 00:00:00 2001 From: doublebyte1 Date: Thu, 26 Jun 2025 09:52:57 +0100 Subject: [PATCH 2/4] - added missing backticks --- docs/source/running-with-docker.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/source/running-with-docker.rst b/docs/source/running-with-docker.rst index e9af329de..8fc49455f 100644 --- a/docs/source/running-with-docker.rst +++ b/docs/source/running-with-docker.rst @@ -103,14 +103,14 @@ The base Docker image supports two additional environment variables for configur To learn more about the Admin API see :ref:`admin-api`. 3. **`CONTAINER_HOST`**: - This variable sets the listening address for incoming connections. Normally the server is listening on localhost (the default), but other values are also possible. + This variable sets the listening address for incoming connections. Normally the server is listening on `localhost` (the default), but other values are also possible. .. code-block:: bash docker run -p 5000:80 -e CONTAINER_HOST=192.168.0.7 -it geopython/pygeoapi 4. **`CONTAINER_PORT`**: - This variable sets the listening port for incoming connections. The default port is `80`; in this example, we change it to 5001. + This variable sets the listening port for incoming connections. The default port is `80`; in this example, we change it to `5001`. .. code-block:: bash @@ -127,7 +127,7 @@ The base Docker image supports two additional environment variables for configur 6. **`WSGI_WORKER_TIMEOUT`**: - Gunicorn workers silent for more than the seconds set by this variable are killed and restarted. The default value is 6000. + Gunicorn workers silent for more than the seconds set by this variable are killed and restarted. The default value is `6000`. .. code-block:: bash From 8b3e9b93bfde8c44a90606c9981df328bd76dec1 Mon Sep 17 00:00:00 2001 From: doublebyte1 Date: Thu, 26 Jun 2025 10:00:40 +0100 Subject: [PATCH 3/4] - capitalised Gunicorn and put link on the first reference. --- docs/source/running-with-docker.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/source/running-with-docker.rst b/docs/source/running-with-docker.rst index 8fc49455f..30a491572 100644 --- a/docs/source/running-with-docker.rst +++ b/docs/source/running-with-docker.rst @@ -15,7 +15,7 @@ The `pygeoapi demo server`_ runs various services from Docker images which also The basics ---------- -The official pygeoapi Docker image will start a pygeoapi Docker container using Gunicorn on internal port 80. +The official pygeoapi Docker image will start a pygeoapi Docker container using `Gunicorn `_ on internal port 80. Either ``IMAGE`` can be called with the ``docker`` command, ``geopython/pygeoapi`` from DockerHub or ``ghcr.io/geopython/pygeoapi`` from the GitHub Container Registry. Examples below use ``geopython/pygeoapi``. @@ -118,7 +118,7 @@ The base Docker image supports two additional environment variables for configur 5. **`WSGI_WORKERS`**: - This variable sets the number of workers used by the `gunicorn server `_, the default being 4. + This variable sets the number of workers used by the Gunicorn server, the default being 4. For performance reasons, `it is not recommended to use a high number of workers `_ . .. code-block:: bash @@ -133,7 +133,7 @@ The base Docker image supports two additional environment variables for configur docker run -p 5000:80 -e WSGI_WORKERS=10 -it geopython/pygeoapi - You can read more about this and other gunicorn settings in the `official documentation `_ + You can read more about this and other Gunicorn settings in the `official documentation `_ Deploying on a sub-path ----------------------- From 6889d864114dcd1336832de341d778b636122aa2 Mon Sep 17 00:00:00 2001 From: doublebyte1 Date: Thu, 26 Jun 2025 10:03:07 +0100 Subject: [PATCH 4/4] - fixed backticks - added backticks to 4 --- docs/source/running-with-docker.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/source/running-with-docker.rst b/docs/source/running-with-docker.rst index 30a491572..61449244f 100644 --- a/docs/source/running-with-docker.rst +++ b/docs/source/running-with-docker.rst @@ -103,14 +103,14 @@ The base Docker image supports two additional environment variables for configur To learn more about the Admin API see :ref:`admin-api`. 3. **`CONTAINER_HOST`**: - This variable sets the listening address for incoming connections. Normally the server is listening on `localhost` (the default), but other values are also possible. + This variable sets the listening address for incoming connections. Normally the server is listening on ``localhost`` (the default), but other values are also possible. .. code-block:: bash docker run -p 5000:80 -e CONTAINER_HOST=192.168.0.7 -it geopython/pygeoapi 4. **`CONTAINER_PORT`**: - This variable sets the listening port for incoming connections. The default port is `80`; in this example, we change it to `5001`. + This variable sets the listening port for incoming connections. The default port is ``80``; in this example, we change it to ``5001``. .. code-block:: bash @@ -118,7 +118,7 @@ The base Docker image supports two additional environment variables for configur 5. **`WSGI_WORKERS`**: - This variable sets the number of workers used by the Gunicorn server, the default being 4. + This variable sets the number of workers used by the Gunicorn server, the default being ``4``. For performance reasons, `it is not recommended to use a high number of workers `_ . .. code-block:: bash @@ -127,7 +127,7 @@ The base Docker image supports two additional environment variables for configur 6. **`WSGI_WORKER_TIMEOUT`**: - Gunicorn workers silent for more than the seconds set by this variable are killed and restarted. The default value is `6000`. + Gunicorn workers silent for more than the seconds set by this variable are killed and restarted. The default value is ``6000``. .. code-block:: bash