only allow connections from sutty

This commit is contained in:
f 2019-10-01 14:21:23 -03:00
parent f6848d58d8
commit 69f4c7d357
No known key found for this signature in database
GPG key ID: 2AE5A13E321F953D
2 changed files with 3 additions and 2 deletions

View file

@ -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

View file

@ -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