From 69f4c7d357870bdb8273c703c68f1861496d9fe1 Mon Sep 17 00:00:00 2001 From: f Date: Tue, 1 Oct 2019 14:21:23 -0300 Subject: [PATCH] only allow connections from sutty --- Dockerfile | 1 + postgresql.sh | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c9ce83b..fb16094 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,6 +12,7 @@ ENV LANG en_US.utf8 ENV PGUSER sutty ENV PGDB sutty ENV PGVER 11 +ENV PGCLIENT sutty RUN apk add --no-cache postgresql postgresql-contrib diff --git a/postgresql.sh b/postgresql.sh index 06c67e9..dd1d364 100644 --- a/postgresql.sh +++ b/postgresql.sh @@ -19,8 +19,8 @@ case $1 in su - postgres -c "/usr/bin/createdb --owner ${PGUSER} ${PGDB}" su - postgres -c "/usr/bin/pg_ctl stop --pgdata ${PGDATA}" - echo "host ${PGDB} ${PGUSER} samenet trust" >> ${PGDATA}/pg_hba.conf - echo "host ${PGDB}_test ${PGUSER} samenet trust" >> ${PGDATA}/pg_hba.conf + echo "host ${PGDB} ${PGUSER} ${PGCLIENT} trust" >> ${PGDATA}/pg_hba.conf + echo "host ${PGDB}_test ${PGUSER} ${PGCLIENT} trust" >> ${PGDATA}/pg_hba.conf echo "listen_addresses = '*'" >> ${PGDATA}/postgresql.conf echo "external_pid_file = '${pid}'" >> ${PGDATA}/postgresql.conf