only allow connections from sutty
This commit is contained in:
parent
f6848d58d8
commit
69f4c7d357
2 changed files with 3 additions and 2 deletions
|
@ -12,6 +12,7 @@ ENV LANG en_US.utf8
|
||||||
ENV PGUSER sutty
|
ENV PGUSER sutty
|
||||||
ENV PGDB sutty
|
ENV PGDB sutty
|
||||||
ENV PGVER 11
|
ENV PGVER 11
|
||||||
|
ENV PGCLIENT sutty
|
||||||
|
|
||||||
RUN apk add --no-cache postgresql postgresql-contrib
|
RUN apk add --no-cache postgresql postgresql-contrib
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,8 @@ case $1 in
|
||||||
su - postgres -c "/usr/bin/createdb --owner ${PGUSER} ${PGDB}"
|
su - postgres -c "/usr/bin/createdb --owner ${PGUSER} ${PGDB}"
|
||||||
su - postgres -c "/usr/bin/pg_ctl stop --pgdata ${PGDATA}"
|
su - postgres -c "/usr/bin/pg_ctl stop --pgdata ${PGDATA}"
|
||||||
|
|
||||||
echo "host ${PGDB} ${PGUSER} samenet trust" >> ${PGDATA}/pg_hba.conf
|
echo "host ${PGDB} ${PGUSER} ${PGCLIENT} trust" >> ${PGDATA}/pg_hba.conf
|
||||||
echo "host ${PGDB}_test ${PGUSER} samenet trust" >> ${PGDATA}/pg_hba.conf
|
echo "host ${PGDB}_test ${PGUSER} ${PGCLIENT} trust" >> ${PGDATA}/pg_hba.conf
|
||||||
|
|
||||||
echo "listen_addresses = '*'" >> ${PGDATA}/postgresql.conf
|
echo "listen_addresses = '*'" >> ${PGDATA}/postgresql.conf
|
||||||
echo "external_pid_file = '${pid}'" >> ${PGDATA}/postgresql.conf
|
echo "external_pid_file = '${pid}'" >> ${PGDATA}/postgresql.conf
|
||||||
|
|
Loading…
Reference in a new issue