* Add EXTRA_CONF environment variable

* Improve readme

* Add EXTRA_CONF default vale in env-data.sh
pull/157/head^2^2
Mario Baranzini 2019-10-25 14:43:15 +02:00 zatwierdzone przez mazano
rodzic ee88848870
commit b4956aa2b6
3 zmienionych plików z 10 dodań i 0 usunięć

Wyświetl plik

@ -130,6 +130,9 @@ PostgreSQL listens to you can define it with the following environment variable.
all connections.
* -e IP_LIST=<*>
You can also define any other configuration to add to `postgres.conf`, separated by '\n' e.g.:
* -e EXTRA_CONF="log_destination = 'stderr'\nlogging_collector = on"
## Convenience docker-compose.yml

Wyświetl plik

@ -118,6 +118,11 @@ fi
if [ -z "${REPLICATION_PASS}" ]; then
REPLICATION_PASS=replicator
fi
if [ -z "$EXTRA_CONF" ]; then
EXTRA_CONF=""
fi
# Compatibility with official postgres variable
# Official postgres variable gets priority
if [ ! -z "${POSTGRES_PASSWORD}" ]; then

Wyświetl plik

@ -36,6 +36,8 @@ checkpoint_timeout = ${CHECK_POINT_TIMEOUT}
#archive_command = 'test ! -f ${WAL_ARCHIVE}/%f && cp -r %p ${WAL_ARCHIVE}/%f'
EOF
echo -e $EXTRA_CONF >> $CONF
# Optimise PostgreSQL shared memory for PostGIS
# shmall units are pages and shmmax units are bytes(?) equivalent to the desired shared_buffer size set in setup_conf.sh - in this case 500MB
echo "kernel.shmmax=543252480" >> /etc/sysctl.conf