Update 'zshrc.bak'

This commit is contained in:
jsmith 2022-10-07 01:37:59 +00:00
parent e41967f871
commit c437f141c4

View File

@ -23,6 +23,32 @@ function V(){
vault login -method oidc
}
function tempDb(){
unset $TMP_PG_NAME
unset $TMP_PG_PW
export TMP_PG_NAME=pg_$(openssl rand -hex 12 )
export TMP_PG_PW=postgres
docker run -p 5432 --name $TMP_PG_NAME -e POSTGRES_PASSWORD=postgres -d postgres
echo "TMP_PG_NAME=${TMP_PG_NAME}"
echo "local password: posgres"
echo "local user: postgres"
echo "waiting to let pg start up and entering temp database"
sleep 5
logT
}
function logT(){
export POSTGRES_PASSWORD=$TMP_PG_PW
psql -h localhost -U postgres postgres
}
function stopTemp(){
docker stop $TMP_PG_NAME
docker rm $TMP_PG_NAME
docker rmi -f $TMP_PG_NAME
docker system prune -f
}
function pt(){
"${ptdir}"/prod-tools
}