Add deploy script
This commit is contained in:
parent
239deb6173
commit
74e3202a26
1 changed files with 21 additions and 0 deletions
21
deploy.sh
Normal file
21
deploy.sh
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
#!/bin/sh
|
||||||
|
set -eo pipefail
|
||||||
|
|
||||||
|
if [ git status --porcelain=2 -uno | grep '' ]; then
|
||||||
|
echo "You have unstaged changes."
|
||||||
|
echo "This shouldn't happen in production."
|
||||||
|
echo "Plsfix. Dank."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Pulling from remote."
|
||||||
|
git pull
|
||||||
|
|
||||||
|
echo "Updating dependencies."
|
||||||
|
~/env/bin/pip install requirements.txt
|
||||||
|
|
||||||
|
echo "Migrating database."
|
||||||
|
~/env/bin/flask db upgrade
|
||||||
|
|
||||||
|
echo "Restarting server using passenger."
|
||||||
|
passenger-config restart-app .
|
Loading…
Reference in a new issue