Skip to content

Commit aee92e7

Browse files
author
mazano
authored
Merge pull request kartoza#320 from kartoza/append_pass
fix appending password to text file on restart and add description to…
2 parents f1d0ec0 + 979ca6c commit aee92e7

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,9 @@ You need to specify different empty directory, like this
135135
-e DEFAULT_COLLATION="id_ID.utf8" \
136136
-e DEFAULT_CTYPE="id_ID.utf8" \
137137
-e PASSWORD_AUTHENTICATION="md5" \
138-
-e INITDB_EXTRA_ARGS="<some more initdb command args>"
138+
-e INITDB_EXTRA_ARGS="<some more initdb command args>" \
139+
-v pgwal-volume:/opt/postgres/pg_wal \
140+
-e POSTGRES_INITDB_WALDIR=/opt/postgres/pg_wal
139141
```
140142

141143
The containers will use above parameters to initialize a new db cluster in the

scripts/env-data.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -387,9 +387,9 @@ function pg_password() {
387387
if [ -z "${POSTGRES_PASS}" ] && [ ! -f ${SETUP_LOCKFILE} ]; then
388388
POSTGRES_PASS=$(openssl rand -base64 15)
389389
touch ${SETUP_LOCKFILE}
390-
echo "$POSTGRES_PASS" >> /tmp/PGPASSWORD.txt
390+
echo "$POSTGRES_PASS" > /tmp/PGPASSWORD.txt
391391
else
392-
echo "$POSTGRES_PASS" >> /tmp/PGPASSWORD.txt
392+
echo "$POSTGRES_PASS" > /tmp/PGPASSWORD.txt
393393
fi
394394

395395
}
@@ -399,9 +399,9 @@ function replication_password() {
399399
if [ -z "${REPLICATION_PASS}" ] && [ ! -f ${SETUP_LOCKFILE} ]; then
400400
REPLICATION_PASS=$(openssl rand -base64 15)
401401
touch ${SETUP_LOCKFILE}
402-
echo "$REPLICATION_PASS" >> /tmp/REPLPASSWORD.txt
402+
echo "$REPLICATION_PASS" > /tmp/REPLPASSWORD.txt
403403
else
404-
echo "$REPLICATION_PASS" >> /tmp/REPLPASSWORD.txt
404+
echo "$REPLICATION_PASS" > /tmp/REPLPASSWORD.txt
405405
fi
406406

407407
}

0 commit comments

Comments
 (0)