Avoid overwriting config, make DB script robuster
This commit is contained in:
parent
fd5b432837
commit
42ac9031e6
2 changed files with 9 additions and 7 deletions
|
@ -30,10 +30,12 @@ else
|
||||||
echo "Not installing airbrake"
|
echo "Not installing airbrake"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ! -f app/config.py ]; then
|
||||||
echo -e "${B} Copying config template. All custom config options can be set in the config.py file ${E}"
|
echo -e "${B} Copying config template. All custom config options can be set in the config.py file ${E}"
|
||||||
cd app
|
cp app/config.example.py app/config.py
|
||||||
cp config.example.py config.py
|
else
|
||||||
cd ..
|
echo -e "${B} Found existing config.py, not copying config teplate ${E}"
|
||||||
|
fi
|
||||||
|
|
||||||
echo -e "${B} Seeding database ${E}"
|
echo -e "${B} Seeding database ${E}"
|
||||||
./populate-db.sh
|
./populate-db.sh
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
cd app
|
cd "$(dirname "$0")/app"
|
||||||
cp database/* .
|
cp database/* .
|
||||||
python create_database.py setup_database
|
../venv/bin/python create_database.py setup_database
|
||||||
rm -f add_* create_database.py muhscheme
|
rm -f add_* create_database.py muhscheme.txt
|
||||||
|
|
Loading…
Reference in a new issue