Export vars to fix the postgres container error
This commit is contained in:
parent
5c9589dae0
commit
4c30235fde
@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user