Mercurial > public > ssdt-docker
comparison scripts/.functions.sh @ 79:85957628f4c0
add script to clear liquibase lock on existing db container
author | smith@nwoca.org |
---|---|
date | Wed, 06 Apr 2016 19:03:16 +0100 |
parents | d2c44193fbaa |
children | 8f45c43ea7a4 |
comparison
equal
deleted
inserted
replaced
78:3eaeb138e1ae | 79:85957628f4c0 |
---|---|
18 service=${1?"Must supply service from current project"} | 18 service=${1?"Must supply service from current project"} |
19 | 19 |
20 container=$( docker-compose ps | cut -d " " -f 1 -s | grep _${service}_ ) | 20 container=$( docker-compose ps | cut -d " " -f 1 -s | grep _${service}_ ) |
21 echo $container | 21 echo $container |
22 } | 22 } |
23 | |
24 executeSQL() { | |
25 service=${1?Must supply db service to execute against} | |
26 container=$(composeGetContainer $service) | |
27 | |
28 echo "$2" | docker exec -i $container sh -c "gosu postgres psql \$DB_NAME" | |
29 } |