From 4c30235fdefa16f5e9dd19c2a9a6699cf9647d4a Mon Sep 17 00:00:00 2001 From: Pan Luo Date: Mon, 30 Jan 2017 15:57:17 -0800 Subject: [PATCH] Export vars to fix the postgres container error --- db/docker-entrypoint1.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/db/docker-entrypoint1.sh b/db/docker-entrypoint1.sh index e21fe89..67d085a 100755 --- a/db/docker-entrypoint1.sh +++ b/db/docker-entrypoint1.sh @@ -4,12 +4,18 @@ : ${WAL_LEVEL:=minimal} : ${ARCHIVE_MODE:=off} : ${ARCHIVE_TIMEOUT:=60} + +export WAL_LEVEL +export ARCHIVE_MODE +export ARCHIVE_TIMEOUT + # PGDATA is defined in upstream postgres dockerfile function update_conf () { if [ -f $PGDATA/postgresql.conf ]; then sed -i "s/wal_level =.*$/wal_level = $WAL_LEVEL/g" $PGDATA/postgresql.conf sed -i "s/archive_mode =.*$/archive_mode = $ARCHIVE_MODE/g" $PGDATA/postgresql.conf + sed -i "s/archive_timeout =.*$/archive_timeout = $ARCHIVE_TIMEOUT/g" $PGDATA/postgresql.conf fi }