Use ENV variables in fr-dev

This allows folks to rename their database and still use the dev scripts
This commit is contained in:
Joel Bradshaw
2020-11-19 13:01:39 -08:00
parent dfc9262876
commit 3eb443c139
2 changed files with 8 additions and 5 deletions

9
fr-dev
View File

@ -1,5 +1,8 @@
#!/bin/bash
# import our ENV variables
source .env
set -e
set -x
@ -39,8 +42,8 @@ case "$1" in
resetdb)
clean
docker-compose up --build -d
execdb dropdb -U fedireads fedireads
execdb createdb -U fedireads fedireads
execdb dropdb -U ${POSTGRES_USER} ${POSTGRES_DB}
execdb createdb -U ${POSTGRES_USER} ${POSTGRES_DB}
initdb
clean
;;
@ -57,7 +60,7 @@ case "$1" in
execweb python manage.py shell
;;
dbshell)
execdb psql -U fedireads fedireads
execdb psql -U ${POSTGRES_USER} ${POSTGRES_DB}
;;
restart_celery)
docker-compose restart celery_worker