From f70f6a18df7ff34c2f3817a182611ab1b7d16ac3 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 3 Jan 2014 11:39:58 -0800 Subject: [PATCH] postgresql/Dockerfile.template: Log to syslog Also use sed to place the listen_addresses config near its associated comments in the config file. --- postgresql/Dockerfile.template | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/postgresql/Dockerfile.template b/postgresql/Dockerfile.template index e7c094b..2d7c84c 100644 --- a/postgresql/Dockerfile.template +++ b/postgresql/Dockerfile.template @@ -32,9 +32,12 @@ RUN yes | emerge --config dev-db/postgresql-server VOLUME ["/var/lib/postgresql"] # Expose PostgreSQL to external network connections -RUN echo "listen_addresses = '*'" >> $(echo /etc/postgresql*/postgresql.conf) +RUN sed -i "s/\(#listen_addresses =.*\)/listen_addresses = '*'\n\1/" /etc/postgresql*/postgresql.conf RUN echo host all all 0.0.0.0/0 trust >> $(echo /etc/postgresql*/pg_hba.conf) +# Setup logging +RUN sed -i "s/\(#log_destination =.*\)/log_destination = 'syslog'\n\1/" /etc/postgresql*/postgresql.conf + # Container networking happens automatically RUN sed -i 's/need net$/use net/' /etc/init.d/* -- 2.26.2