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
Support enviornment vars in base Docker image (#1873)
* Support enviornment vars in base Docker image
* Update running with docker documentation
* s/PYGEOAPI_URL/PYGEOAPI_SERVER_URL/g
* s/PYGEOAPI_ADMIN_API/PYGEOAPI_SERVER_ADMIN/g
Copy file name to clipboardExpand all lines: docs/source/running-with-docker.rst
+24Lines changed: 24 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -71,6 +71,30 @@ Or you can create a ``Dockerfile`` extending the base image and **copy** in your
71
71
72
72
A corresponding example can be found in https://github.com/geopython/demo.pygeoapi.io/tree/master/services/pygeoapi_master
73
73
74
+
Environment Variables for Configuration
75
+
---------------------------------------
76
+
77
+
The base Docker image supports two additional environment variables for configuring the `pygeoapi` server behavior:
78
+
79
+
1. **`PYGEOAPI_SERVER_URL`**:
80
+
This variable sets the `pygeoapi` server URL in the configuration. It is useful for dynamically configuring the server URL during container deployment. For example:
81
+
82
+
.. code-block:: bash
83
+
84
+
docker run -p 2018:80 -e PYGEOAPI_SERVER_URL='http://localhost:2018' -it geopython/pygeoapi
85
+
86
+
This ensures the service URLs in the configuration file are automatically updated to reflect the specified URL.
87
+
88
+
2. **`PYGEOAPI_SERVER_ADMIN`**:
89
+
This boolean environment variable enables or disables the `pygeoapi` Admin API. By default, the Admin API is disabled. To enable it:
90
+
91
+
.. code-block:: bash
92
+
93
+
docker run -p 5000:80 -e PYGEOAPI_SERVER_ADMIN=true -it geopython/pygeoapi
94
+
95
+
This does not enable hot reloading of the `pygoeapi` configuration. To learn more about the Admin API see :ref:`admin-api`.
0 commit comments