@@ -30,7 +30,7 @@ pkgs.dockerTools.buildImage {
|
||||
|
||||
runAsRoot = ''
|
||||
${pkgs.dockerTools.shadowSetup}
|
||||
mkdir -p /etc/postgresql /var/lib/postgresql /run/postgresql
|
||||
mkdir -p /etc/postgresql /run/postgresql
|
||||
cp ${postgresql}/share/postgresql/postgresql.conf.sample /etc/postgresql/postgresql.conf
|
||||
${pkgs.gnused}/bin/sed -ri "s!^#?(listen_addresses)\s*=\s*\S+.*!\1 = '*'!" /etc/postgresql/postgresql.conf
|
||||
'';
|
||||
|
@@ -21,7 +21,6 @@ mkfifo "$LOG_PIPE"
|
||||
fi
|
||||
done < "$LOG_PIPE"
|
||||
) &
|
||||
LOG_PID=$!
|
||||
|
||||
if [ ! -s "$PGDATA/PG_VERSION" ]; then
|
||||
tmpfile=$(mktemp)
|
||||
@@ -42,5 +41,4 @@ if [ ! -s "$PGDATA/PG_VERSION" ]; then
|
||||
pg_ctl -m fast -w stop
|
||||
fi
|
||||
|
||||
trap 'kill $LOG_PID' EXIT
|
||||
exec postgres -c config_file="/etc/postgresql/postgresql.conf" "$@" > "$LOG_PIPE" 2>&1
|
||||
|
Reference in New Issue
Block a user