fixed issue in docker-entrypoint
This commit is contained in:
parent
01f6f01f24
commit
7b96dd80d5
@ -12,19 +12,19 @@
|
|||||||
PASSPHRASE=""
|
PASSPHRASE=""
|
||||||
if [ "${PASSWORD_SECRET}" ]; then
|
if [ "${PASSWORD_SECRET}" ]; then
|
||||||
if [ -f "/run/secrets/${PASSWORD_SECRET}" ]; then
|
if [ -f "/run/secrets/${PASSWORD_SECRET}" ]; then
|
||||||
PASSPHRASE = $(cat /run/secrets/${PASSWORD_SECRET})
|
PASSPHRASE=$(cat /run/secrets/${PASSWORD_SECRET})
|
||||||
else
|
else
|
||||||
echo "ERROR: Secret file not found in /run/secrets/${PASSWORD_SECRET}"
|
echo "ERROR: Secret file not found in /run/secrets/${PASSWORD_SECRET}"
|
||||||
echo "Please verify your docker secrets configuration."
|
echo "Please verify your docker secrets configuration."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
PASSPHRASE = ${PASSWORD}
|
PASSPHRASE=${PASSWORD}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create the file
|
# Create the file
|
||||||
cat <<-EOF > ${HOME}/.pgpass
|
cat <<-EOF > ${HOME}/.pgpass
|
||||||
${DBHOST}:*:*:${USERNAME}:${PASSPHRASE}
|
${DBHOST}:*:*:${USERNAME:-postgres}:${PASSPHRASE}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Execute cron with parameters (autopostgresql script is under /etc/cron.daily)
|
# Execute cron with parameters (autopostgresql script is under /etc/cron.daily)
|
||||||
|
Loading…
Reference in New Issue
Block a user