Skip to content

Commit cbcb237

Browse files
committed
adding a simple bash wrapper to pgcli for help with linked containers
1 parent 461d1bc commit cbcb237

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

run-pgcli.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
#
3+
# Simple wrapper for the pgli tool. This script allows us to pull in linked
4+
# docker containers if the user decides to bring up the cli that way.
5+
6+
if [ -z ${POSTGRES_PORT_5432_TCP_ADDR+x} ]; then
7+
# POSTGRES linked variables aren't set, just call pgcli without params
8+
pgcli
9+
else
10+
pgcli -h $POSTGRES_PORT_5432_TCP_ADDR -p $POSTGRES_PORT_5432_TCP_PORT -U $POSTGRES_ENV_POSTGRES_USER
11+
fi
12+

0 commit comments

Comments
 (0)