kopia lustrzana https://github.com/kartoza/docker-postgis
Fix password auth for pg_hba that is hardcoded during build
rodzic
1932908306
commit
bd8d184351
|
@ -76,7 +76,6 @@ echo "include 'streaming_replication.conf'" >> $CONF
|
|||
fi
|
||||
|
||||
if [[ ! -f ${ROOT_CONF}/extra.conf ]]; then
|
||||
echo "${ROOT_CONF}/extra.conf doesn't exists"
|
||||
# If it doesn't exists, copy from /settings directory if exists
|
||||
if [[ -f /settings/extra.conf ]]; then
|
||||
cp -f /settings/extra.conf ${ROOT_CONF}/extra.conf
|
||||
|
|
|
@ -12,6 +12,11 @@ fi
|
|||
# Reconfigure pg_hba if environment settings changed
|
||||
cat ${ROOT_CONF}/pg_hba.conf.template > ${ROOT_CONF}/pg_hba.conf
|
||||
|
||||
# Restrict subnet to docker private network
|
||||
echo "host all all 172.0.0.0/8 ${PASSWORD_AUTHENTICATION}" >> $ROOT_CONF/pg_hba.conf
|
||||
# And allow access from DockerToolbox / Boot to docker on OSX
|
||||
echo "host all all 192.168.0.0/16 ${PASSWORD_AUTHENTICATION}" >> $ROOT_CONF/pg_hba.conf
|
||||
|
||||
# Custom IP range via docker run -e (https://docs.docker.com/engine/reference/run/#env-environment-variables)
|
||||
# Usage is: docker run [...] -e ALLOW_IP_RANGE='192.168.0.0/16'
|
||||
if [[ "$ALLOW_IP_RANGE" ]]
|
||||
|
|
|
@ -5,12 +5,6 @@ chmod 600 /etc/ssl/private/ssl-cert-snakeoil.key
|
|||
# These tasks are run as root
|
||||
source /scripts/env-data.sh
|
||||
|
||||
|
||||
# Restrict subnet to docker private network
|
||||
echo "host all all 172.0.0.0/8 ${PASSWORD_AUTHENTICATION}" >> $ROOT_CONF/pg_hba.conf
|
||||
# And allow access from DockerToolbox / Boot to docker on OSX
|
||||
echo "host all all 192.168.0.0/16 ${PASSWORD_AUTHENTICATION}" >> $ROOT_CONF/pg_hba.conf
|
||||
|
||||
# Create backup template for conf
|
||||
cat $CONF > $CONF.template
|
||||
cat $ROOT_CONF/pg_hba.conf > $ROOT_CONF/pg_hba.conf.template
|
||||
|
|
Ładowanie…
Reference in New Issue