Created
September 7, 2018 15:12
-
-
Save efi-mk/866750e89d1f5b8366a0334b743e92c6 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
export PYTHONPATH=`pwd` | |
./manage.py collectstatic --noinput | |
echo Running ${1:-"update"} on ${2:-"local_zappa_settings.json"} | |
zappa ${1:-"update"} -s ${2:-"local_zappa_settings.json"} | |
zappa manage -s ${2:-"local_zappa_settings.json"} ${3:-"development"} migrate | |
zappa invoke -s ${2:-"local_zappa_settings.json"} ${3:-"development"} "from django.contrib.auth.models import User; import os; User.objects.create_superuser('root', '[email protected]', os.environ.get('DJANGO_ADMIN_PASSWORD','*****')) if len(User.objects.filter(email='[email protected]')) == 0 else print('Admin exists')" --raw |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment