fix appending password to text file on restart and add description to mention pg-wal creation

pull/320/head
admire 2021-07-01 10:31:07 +02:00
rodzic f1d0ec0d89
commit 979ca6c220
2 zmienionych plików z 7 dodań i 5 usunięć

Wyświetl plik

@ -135,7 +135,9 @@ You need to specify different empty directory, like this
-e DEFAULT_COLLATION="id_ID.utf8" \
-e DEFAULT_CTYPE="id_ID.utf8" \
-e PASSWORD_AUTHENTICATION="md5" \
-e INITDB_EXTRA_ARGS="<some more initdb command args>"
-e INITDB_EXTRA_ARGS="<some more initdb command args>" \
-v pgwal-volume:/opt/postgres/pg_wal \
-e POSTGRES_INITDB_WALDIR=/opt/postgres/pg_wal
```
The containers will use above parameters to initialize a new db cluster in the

Wyświetl plik

@ -387,9 +387,9 @@ function pg_password() {
if [ -z "${POSTGRES_PASS}" ] && [ ! -f ${SETUP_LOCKFILE} ]; then
POSTGRES_PASS=$(openssl rand -base64 15)
touch ${SETUP_LOCKFILE}
echo "$POSTGRES_PASS" >> /tmp/PGPASSWORD.txt
echo "$POSTGRES_PASS" > /tmp/PGPASSWORD.txt
else
echo "$POSTGRES_PASS" >> /tmp/PGPASSWORD.txt
echo "$POSTGRES_PASS" > /tmp/PGPASSWORD.txt
fi
}
@ -399,9 +399,9 @@ function replication_password() {
if [ -z "${REPLICATION_PASS}" ] && [ ! -f ${SETUP_LOCKFILE} ]; then
REPLICATION_PASS=$(openssl rand -base64 15)
touch ${SETUP_LOCKFILE}
echo "$REPLICATION_PASS" >> /tmp/REPLPASSWORD.txt
echo "$REPLICATION_PASS" > /tmp/REPLPASSWORD.txt
else
echo "$REPLICATION_PASS" >> /tmp/REPLPASSWORD.txt
echo "$REPLICATION_PASS" > /tmp/REPLPASSWORD.txt
fi
}