From 579bb735742a7dd9c6b43ba1611ba76979fd5c83 Mon Sep 17 00:00:00 2001 From: Anna Sidwell Date: Tue, 9 Oct 2018 21:23:12 -0400 Subject: [PATCH] Add script to get into postgres on production --- production-dbshell.sh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 production-dbshell.sh diff --git a/production-dbshell.sh b/production-dbshell.sh new file mode 100755 index 0000000..5a7a91b --- /dev/null +++ b/production-dbshell.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +export PGPASSWORD=$(grep "POSTGRES_PASSWORD" /production/ojuso-map/environment | cut -d= -f2-) +PGUSER=$(grep "POSTGRES_USER" /production/ojuso-map/environment | cut -d= -f2-) + +psql --host=127.0.0.1 --port=5432 --username=$PGUSER