-
-
Save pfaffman/441774b4d73bd180869cb306ffcebb0b to your computer and use it in GitHub Desktop.
Create a new database for Discourse
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
if [ ! -f discourse.sublime-project ] | |
then | |
echo "Dude. There's no Discourse here." | |
exit | |
else | |
echo Killing any running rubies. . . | |
killall ruby | |
echo "==================================================" | |
echo "==================================================" | |
echo "==================================================" | |
echo "==================================================" | |
echo "==================================================" | |
echo "ABOUT TO DELETE EVERYTHING. . . . " | |
echo "==================================================" | |
echo "==================================================" | |
echo "==================================================" | |
echo "==================================================" | |
echo "==================================================" | |
sleep 5 | |
echo "Here goes . . ." | |
rm -fr public/uploads | |
RAILS_ENV=development bundle exec rake db:drop db:create db:migrate | |
cat <<EOF | bundle exec rake admin:create | |
me@nowhere.com | |
secretpassword | |
secretpassword | |
EOF | |
echo Flushing Redis | |
redis-cli flushall | |
echo Done. | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment