Merge pull request #42 from matt-baker/docker-machine-support

Allow custom IP range in pg_hba.conf via docker run -e
pull/43/head
Tim Sutton 2016-05-25 15:13:31 +02:00
commit c97ea78fca
1 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -63,6 +63,12 @@ if [ -z "$TOPOLOGY" ]; then
TOPOLOGY=true
fi
# 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" ]
then
echo "host all all $ALLOW_IP_RANGE md5" >> /etc/postgresql/9.4/main/pg_hba.conf
fi
# redirect user/pass into a file so we can echo it into
# docker logs when container starts