aboutsummaryrefslogtreecommitdiff
path: root/wait-for-postgres.sh
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2020-04-06 23:05:31 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2020-04-06 23:05:31 +0200
commit49b199c610bb32d0581d771d856b3e3332707f17 (patch)
tree9e9c633d5d77bf3ae56395d8cd732ce20dba6b43 /wait-for-postgres.sh
parentAdded a link to the documentation in the about page. (diff)
downloadnewspipe-49b199c610bb32d0581d771d856b3e3332707f17.tar.gz
newspipe-49b199c610bb32d0581d771d856b3e3332707f17.tar.bz2
newspipe-49b199c610bb32d0581d771d856b3e3332707f17.zip
Migrate form Flask-Script to the built-in integration of the click command line interface of Flask.
Diffstat (limited to 'wait-for-postgres.sh')
-rwxr-xr-xwait-for-postgres.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/wait-for-postgres.sh b/wait-for-postgres.sh
index 3f4e7067..be5e8afe 100755
--- a/wait-for-postgres.sh
+++ b/wait-for-postgres.sh
@@ -13,7 +13,10 @@ do
done
>&2 echo "Postgres is up - executing command"
-export Newspipe_CONFIG=/newspipe/instance/config.py
-poetry run ./manager.py db_create >/dev/null
+export NEWSPIPE_CONFIG=/newspipe/instance/config.py
+export FLASK_APP=runserver.py
+export FLASK_ENV=development
+poetry run flask db_create >/dev/null
+poetry run flask create_admin --nickname admin --password password >/dev/null
poetry run pybabel compile -d newspipe/translations
-poetry run ./runserver.py
+poetry run flask run
bgstack15