mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-10-31 22:19:00 +00:00
25 lines
446 B
Bash
Executable file
25 lines
446 B
Bash
Executable file
#!/bin/bash
|
|
set -e
|
|
|
|
if [ ! -f .env ]; then
|
|
echo "No .env found -- copying .example.env to .env!"
|
|
cp .env.example .env
|
|
fi
|
|
|
|
source .env
|
|
|
|
if [ $BOOKWYRM_DATABASE_BACKEND = 'sqlite' ]; then
|
|
if [ -f fedireads.db ]; then
|
|
rm fedireads.db
|
|
fi
|
|
else
|
|
# assume postgres
|
|
dropdb fedireads
|
|
createdb fedireads
|
|
fi
|
|
|
|
python manage.py makemigrations fedireads
|
|
python manage.py migrate
|
|
|
|
python manage.py shell < init_db.py
|
|
python manage.py runserver
|