diff --git a/docs/en_US/container_deployment.rst b/docs/en_US/container_deployment.rst index d3beaef6f..fa05eb569 100644 --- a/docs/en_US/container_deployment.rst +++ b/docs/en_US/container_deployment.rst @@ -68,6 +68,13 @@ Default: 80 or 443 (if TLS is enabled) Allows the port that the server listens on to be set to a specific value rather than using the default. +*PGADMIN_SERVER_JSON_FILE* + +Default: /pgadmin4/servers.json + +Override the default file path for the server definition list. See the +/pgadmin4/servers.json mapped file below for more information. + *GUNICORN_THREADS* Default: 25 diff --git a/docs/en_US/release_notes_4_10.rst b/docs/en_US/release_notes_4_10.rst index 674803fd1..9be0f76d8 100644 --- a/docs/en_US/release_notes_4_10.rst +++ b/docs/en_US/release_notes_4_10.rst @@ -10,6 +10,7 @@ New features ************ | `Feature #4139 `_ - Allow some objects to be dragged/dropped into the Query Tool to insert their signature into the query text. +| `Feature #4400 `_ - Allow the path to /pgadmin4/servers.json to be overridden in the container distribution. Bug fixes ********* diff --git a/pkg/docker/entrypoint.sh b/pkg/docker/entrypoint.sh index d0375e122..f7f9b9ab3 100755 --- a/pkg/docker/entrypoint.sh +++ b/pkg/docker/entrypoint.sh @@ -15,9 +15,10 @@ if [ ! -f /var/lib/pgadmin/pgadmin4.db ]; then # Importing pgadmin4 (from this script) is enough python run_pgadmin.py + export PGADMIN_SERVER_JSON_FILE=${PGADMIN_SERVER_JSON:-/pgadmin4/servers.json} # Pre-load any required servers - if [ -f /pgadmin4/servers.json ]; then - /usr/local/bin/python /pgadmin4/setup.py --load-servers /pgadmin4/servers.json --user ${PGADMIN_DEFAULT_EMAIL} + if [ -f "${PGADMIN_SERVER_JSON_FILE}" ]; then + /usr/local/bin/python /pgadmin4/setup.py --load-servers "${PGADMIN_SERVER_JSON_FILE}" --user ${PGADMIN_DEFAULT_EMAIL} fi fi