Using PGHOST instaed of inline host

This commit is contained in:
James Patrick 2023-05-24 20:16:24 +00:00
parent f454ec4adf
commit 46af714c87
2 changed files with 5 additions and 4 deletions

View File

@ -1,6 +1,7 @@
export build_dir="/opt/build"
export apps_dir="/mount/data0/apps"
export PGHOST="dev.cpmixkhfrend.us-east-1.rds.amazonaws.com"
for build_path in $build_dir/* ; do
if [[ $build_path =~ "shared" ]]; then

View File

@ -13,13 +13,13 @@ db_envs=(
# Database Connection
for env in $db_envs ; do
eval "alias psql_$env='psql -d $env -h dev.cpmixkhfrend.us-east-1.rds.amazonaws.com -p 5432 -U ${env}_owner'"
eval "alias psql_$env='psql -d $env -p 5432 -U ${env}_owner'"
if (( $+commands[pgcli] )); then
eval "alias pg_${env}='pgcli -d $env -h dev.cpmixkhfrend.us-east-1.rds.amazonaws.com -p 5432 -U ${env}_owner'"
eval "alias pg_${env}='pgcli -d $env -p 5432 -U ${env}_owner'"
fi
done
# List Databases
alias psql_l="psql -h dev.cpmixkhfrend.us-east-1.rds.amazonaws.com -p 5432 -U greenfiling -l"
alias psql_l="psql -p 5432 -U greenfiling -l"
# Sign-In as limited super user.
alias psql_root="psql -d postgres -h dev.cpmixkhfrend.us-east-1.rds.amazonaws.com -p 5432 -U greenfiling"
alias psql_root="psql -d postgres -p 5432 -U greenfiling"