Skip to content

Instantly share code, notes, and snippets.

@efi-mk efi-mk/deploy.sh
Created Sep 7, 2018

Embed
What would you like to do?
#!/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', 'mail@nomail.com', os.environ.get('DJANGO_ADMIN_PASSWORD','*****')) if len(User.objects.filter(email='mail@nomail.com')) == 0 else print('Admin exists')" --raw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.