Skip to content

Commit 4099256

Browse files
author
doublebyte1
committed
- Added information about other environmental variables that are available in the docker image
1 parent 4fba2a4 commit 4099256

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

docs/source/running-with-docker.rst

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,38 @@ The base Docker image supports two additional environment variables for configur
102102
103103
To learn more about the Admin API see :ref:`admin-api`.
104104

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 <https://docs.gunicorn.org/en/latest/>`_, 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/>`_
105137

106138
Deploying on a sub-path
107139
-----------------------

0 commit comments

Comments
 (0)