Last active
July 29, 2018 11:43
-
-
Save adamghill/85c7147fb8982b141a6fbf9613e6a3f4 to your computer and use it in GitHub Desktop.
Shell script to start a Django webserver
This file contains hidden or 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
#!/bin/sh | |
set -e | |
PIPENV_VENV_IN_PROJECT=1 pipenv install --dev | |
if [ $? -eq 0 ]; then | |
PIPENV_VENV_IN_PROJECT=1 pipenv run python manage.py migrate --noinput && | |
PIPENV_VENV_IN_PROJECT=1 PYTHONDONTWRITEBYTECODE=1 pipenv run python manage.py runserver_plus --settings=project.settings 0:8001 | |
else | |
echo "ERROR: pipenv instll failed." | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment