Income Sources :: Jobs :: 2022 :: HP :: Lens :: Repos :: poly-glass :: team-mo :: tooling :: silica-local-cloud :: db
⪼ Made with 💜 by realpolyglot.com
- Income Sources :: Jobs :: 2022 :: HP :: Lens :: Repos :: poly-glass :: team-mo :: integrations :: » db
- db.sh: easy postgresql access via command-line (silica-local-cloud/31)
- Quick Demo of the db.sh Command
./db.sh match-maker
#!/usr/bin/env sh
SERVICE=$1
PGUSER=$(cat docker-compose.yaml | grep $SERVICE: -A 30 | grep 'DB_USER:' | awk -F':' '{ print $2 }' | tr -d ' ')
PGPASS=$(cat docker-compose.yaml | grep $SERVICE: -A 30 | grep 'DB_PASS:' | awk -F':' '{ print $2 }' | tr -d ' ')
PGUSER=$PGUSER PGPASSWORD=$PGPASS psql -h localhost