diff --git a/Dockerfile b/Dockerfile index 3da2a07..7a506ac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,8 @@ MAINTAINER sameer@damagehead.com ENV PG_VERSION=9.4 \ PG_USER=postgres \ PG_HOME=/var/lib/postgresql \ - PG_RUNDIR=/run/postgresql + PG_RUNDIR=/run/postgresql \ + PG_LOGDIR=/var/log/postgresql ENV PG_CONFDIR="/etc/postgresql/${PG_VERSION}/main" \ PG_BINDIR="/usr/lib/postgresql/${PG_VERSION}/bin" \ diff --git a/entrypoint.sh b/entrypoint.sh index be19094..2cae815 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -55,6 +55,7 @@ if [[ ${USERMAP_UID} != ${USERMAP_ORIG_UID} ]] || [[ ${USERMAP_GID} != ${USERMAP fi create_data_dir +create_log_dir create_run_dir # fix ownership of ${PG_CONFDIR} (may be necessary if USERMAP_* was set)