From 8c98a34eb5f436d5f44949da8f514ae79ad856ff Mon Sep 17 00:00:00 2001 From: "Vadim A. Misbakh-Soloviov" Date: Fri, 2 Aug 2019 13:06:00 +0700 Subject: [PATCH] entrypoint: Added support for setting AuthMethod This change adds support to choose which auth method to use on newly-created database (md5 vs scram-sha-256 (... vs future ones)) --- 11/alpine/docker-entrypoint.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/11/alpine/docker-entrypoint.sh b/11/alpine/docker-entrypoint.sh index 6dce8a15c6..69373605ce 100755 --- a/11/alpine/docker-entrypoint.sh +++ b/11/alpine/docker-entrypoint.sh @@ -83,7 +83,8 @@ if [ "$1" = 'postgres' ]; then # check password first so we can output the warning before postgres # messes it up if [ -n "$POSTGRES_PASSWORD" ]; then - authMethod=md5 + file_env 'POSTGRES_AUTH_METHOD' + authMethod="${POSTGRES_AUTH_METHOD:-md5}" if [ "${#POSTGRES_PASSWORD}" -ge 100 ]; then cat >&2 <<-'EOWARN'