Fixes on deployment

This commit is contained in:
Marc Aymerich 2015-10-02 13:01:01 +00:00
parent d021dcea92
commit 13307adbcd
2 changed files with 7 additions and 3 deletions

View File

@ -3,7 +3,7 @@ import textwrap
from optparse import make_option
from django.conf import settings
from django.core.management.base import BaseCommand
from django.core.management.base import BaseCommand, CommandError
from orchestra.utils.paths import get_project_dir
from orchestra.utils.python import random_ascii

View File

@ -111,8 +111,12 @@ function main () {
cd $project_name
run sudo service postgresql start
run sudo python3 -W ignore manage.py setuppostgres $noinput
if [[ $noinput == '--noinput' ]]; then
db_password=$(ps aux | sha256sum | base64 | head -c 10)
run sudo python3 -W ignore manage.py setuppostgres --noinput --db_password $db_password
else
run sudo python3 -W ignore manage.py setuppostgres
fi
surun "python3 -W ignore manage.py migrate $noinput"
if [[ $noinput == '--noinput' ]]; then
# Create orchestra superuser