mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Added support for passing password using Docker Secret to Docker images. Fixes #7332
This commit is contained in:
parent
48336fd7f4
commit
3297546e0a
@ -52,6 +52,14 @@ to login to pgAdmin. This variable is required and must be set at launch time.
|
|||||||
This is the password used when setting up the initial administrator account to
|
This is the password used when setting up the initial administrator account to
|
||||||
login to pgAdmin. This variable is required and must be set at launch time.
|
login to pgAdmin. This variable is required and must be set at launch time.
|
||||||
|
|
||||||
|
**PGADMIN_DEFAULT_PASSWORD_FILE**
|
||||||
|
|
||||||
|
This is the password used when setting up the initial administrator account to
|
||||||
|
login to pgAdmin. This value should be set to *docker secret* in order to set
|
||||||
|
the password. This variable is supported in docker swarm environment or while creating
|
||||||
|
container with docker compose. PGADMIN_DEFAULT_PASSWORD or PGADMIN_DEFAULT_PASSWORD_FILE
|
||||||
|
variable is required and must be set at launch time.
|
||||||
|
|
||||||
**PGADMIN_DISABLE_POSTFIX**
|
**PGADMIN_DISABLE_POSTFIX**
|
||||||
|
|
||||||
*Default: <null>*
|
*Default: <null>*
|
||||||
|
@ -9,6 +9,7 @@ This release contains a number of bug fixes and new features since the release o
|
|||||||
New features
|
New features
|
||||||
************
|
************
|
||||||
|
|
||||||
|
| `Issue #7332 <https://redmine.postgresql.org/issues/7332>`_ - Added support for passing password using Docker Secret to Docker images.
|
||||||
| `Issue #7351 <https://redmine.postgresql.org/issues/7351>`_ - Added the option 'Show template databases?' to display template databases regardless of the setting of 'Show system objects?'.
|
| `Issue #7351 <https://redmine.postgresql.org/issues/7351>`_ - Added the option 'Show template databases?' to display template databases regardless of the setting of 'Show system objects?'.
|
||||||
|
|
||||||
Housekeeping
|
Housekeeping
|
||||||
|
@ -36,8 +36,8 @@ EOF
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f /var/lib/pgadmin/pgadmin4.db ]; then
|
if [ ! -f /var/lib/pgadmin/pgadmin4.db ]; then
|
||||||
if [ -z "${PGADMIN_DEFAULT_EMAIL}" -o -z "${PGADMIN_DEFAULT_PASSWORD}" ]; then
|
if ([ -z "${PGADMIN_DEFAULT_EMAIL}" ]) || ( [ -z "${PGADMIN_DEFAULT_PASSWORD}" ] && [ ! -n "${PGADMIN_DEFAULT_PASSWORD_FILE}" ] ); then
|
||||||
echo 'You need to define the PGADMIN_DEFAULT_EMAIL and PGADMIN_DEFAULT_PASSWORD environment variables.'
|
echo 'You need to define the PGADMIN_DEFAULT_EMAIL and PGADMIN_DEFAULT_PASSWORD or PGADMIN_DEFAULT_PASSWORD_FILE environment variables.'
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -47,6 +47,11 @@ if [ ! -f /var/lib/pgadmin/pgadmin4.db ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Read secret contents
|
||||||
|
if [ -n "${PGADMIN_DEFAULT_PASSWORD_FILE}" ]; then
|
||||||
|
export PGADMIN_DEFAULT_PASSWORD=$(cat ${PGADMIN_DEFAULT_PASSWORD_FILE})
|
||||||
|
fi
|
||||||
|
|
||||||
# Set the default username and password in a
|
# Set the default username and password in a
|
||||||
# backwards compatible way
|
# backwards compatible way
|
||||||
export PGADMIN_SETUP_EMAIL=${PGADMIN_DEFAULT_EMAIL}
|
export PGADMIN_SETUP_EMAIL=${PGADMIN_DEFAULT_EMAIL}
|
||||||
|
Loading…
Reference in New Issue
Block a user