chore: remove plaintext postgres retry credentials
This commit is contained in:
Regular → Executable
+10
-10
@@ -1,13 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
export PGHOST=heicode.postgres.database.azure.com
|
||||
export PGPORT=5432
|
||||
export PGDATABASE=heicode
|
||||
export PGPASSWORD="Myadmin@123456."
|
||||
export PGSSLMODE=require
|
||||
set -euo pipefail
|
||||
|
||||
echo "[try-1] PGUSER=heicode"
|
||||
PGUSER=heicode psql -c "select current_user, current_database();" || true
|
||||
# Local PostgreSQL retry helper.
|
||||
# Do not store real credentials in this file. Supply them through the shell
|
||||
# environment or a secret manager before running it.
|
||||
: "${PGHOST:?PGHOST is required}"
|
||||
: "${PGUSER:?PGUSER is required}"
|
||||
: "${PGPORT:=5432}"
|
||||
: "${PGDATABASE:?PGDATABASE is required}"
|
||||
: "${PGPASSWORD:?PGPASSWORD is required}"
|
||||
|
||||
echo "[try-2] PGUSER=heicode@heicode"
|
||||
PGUSER='heicode@heicode' psql -c "select current_user, current_database();" || true
|
||||
psql "sslmode=require host=${PGHOST} port=${PGPORT} user=${PGUSER} dbname=${PGDATABASE}"
|
||||
|
||||
Reference in New Issue
Block a user