You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Docs update to reflect other environmental variables available in the docker image (#2047)
* - Added information about other environmental variables that are available in the docker image
* - added missing backticks
* - capitalised Gunicorn and put link on the first reference.
* - fixed backticks
- added backticks to 4
---------
Co-authored-by: doublebyte1 <info@doublebyte.net>
Copy file name to clipboardExpand all lines: docs/source/running-with-docker.rst
+33-1Lines changed: 33 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ The `pygeoapi demo server`_ runs various services from Docker images which also
15
15
The basics
16
16
----------
17
17
18
-
The official pygeoapi Docker image will start a pygeoapi Docker container using Gunicorn on internal port 80.
18
+
The official pygeoapi Docker image will start a pygeoapi Docker container using `Gunicorn<https://docs.gunicorn.org/en/latest/>`_ on internal port 80.
19
19
20
20
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``.
21
21
@@ -102,6 +102,38 @@ The base Docker image supports two additional environment variables for configur
102
102
103
103
To learn more about the Admin API see :ref:`admin-api`.
104
104
105
+
3. **`CONTAINER_HOST`**:
106
+
This variable sets the listening address for incoming connections. Normally the server is listening on ``localhost`` (the default), but other values are also possible.
107
+
108
+
.. code-block:: bash
109
+
110
+
docker run -p 5000:80 -e CONTAINER_HOST=192.168.0.7 -it geopython/pygeoapi
111
+
112
+
4. **`CONTAINER_PORT`**:
113
+
This variable sets the listening port for incoming connections. The default port is ``80``; in this example, we change it to ``5001``.
114
+
115
+
.. code-block:: bash
116
+
117
+
docker run -p 5000:5001 -e CONTAINER_PORT=5001 -it geopython/pygeoapi
118
+
119
+
5. **`WSGI_WORKERS`**:
120
+
121
+
This variable sets the number of workers used by the Gunicorn server, the default being ``4``.
122
+
For performance reasons, `it is not recommended to use a high number of workers <https://docs.gunicorn.org/en/latest/design.html#how-many-workers>`_ .
123
+
124
+
.. code-block:: bash
125
+
126
+
docker run -p 5000:80 -e WSGI_WORKERS=10 -it geopython/pygeoapi
127
+
128
+
6. **`WSGI_WORKER_TIMEOUT`**:
129
+
130
+
Gunicorn workers silent for more than the seconds set by this variable are killed and restarted. The default value is ``6000``.
131
+
132
+
.. code-block:: bash
133
+
134
+
docker run -p 5000:80 -e WSGI_WORKERS=10 -it geopython/pygeoapi
135
+
136
+
You can read more about this and other Gunicorn settings in the `official documentation <https://docs.gunicorn.org/en/stable/>`_
0 commit comments