From 2acd8a75ef2ba68ab6cbf16f3eef35bd7ea47e18 Mon Sep 17 00:00:00 2001 From: dortal94 Date: Mon, 27 Apr 2020 19:06:17 +0100 Subject: [PATCH] Added db auto creation on vagrant up --- setup.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setup.sh b/setup.sh index 1e6346c..147887d 100644 --- a/setup.sh +++ b/setup.sh @@ -17,6 +17,10 @@ sudo apt-get install -y postgresql postgresql-contrib echo "install requirements" pip3 install -r /vagrant/requirements.txt +echo "configuring database" +sudo -u postgres createdb edison +sudo -u postgres psql -c "ALTER ROLE postgres WITH PASSWORD 'edison';" + export FLASK_ENV=development echo "running app.py"