Fix dbshell command

dbshell needs to be run in a already-running container, thus exec rather
than run is the correct docker-compose command.
This commit is contained in:
Wesley Aptekar-Cassels 2023-03-09 02:01:05 -05:00
parent 00666c4f52
commit cc610372ca

6
bw-dev
View file

@ -32,8 +32,8 @@ function runweb {
docker-compose run --rm web "$@"
}
function rundb {
docker-compose run --rm db $@
function execdb {
docker-compose exec db $@
}
function execweb {
@ -110,7 +110,7 @@ case "$CMD" in
runweb python manage.py shell
;;
dbshell)
rundb psql -U ${POSTGRES_USER} ${POSTGRES_DB}
execdb psql -U ${POSTGRES_USER} ${POSTGRES_DB}
;;
restart_celery)
docker-compose restart celery_worker