Files
heicode-mananger/heicode/.retry_pg.sh
T

14 lines
463 B
Bash

#!/usr/bin/env bash
set -euo pipefail
# 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}"
psql "sslmode=require host=${PGHOST} port=${PGPORT} user=${PGUSER} dbname=${PGDATABASE}"