Fixes on deployment
This commit is contained in:
parent
d021dcea92
commit
13307adbcd
|
@ -3,7 +3,7 @@ import textwrap
|
||||||
from optparse import make_option
|
from optparse import make_option
|
||||||
|
|
||||||
from django.conf import settings
|
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.paths import get_project_dir
|
||||||
from orchestra.utils.python import random_ascii
|
from orchestra.utils.python import random_ascii
|
||||||
|
|
|
@ -111,8 +111,12 @@ function main () {
|
||||||
cd $project_name
|
cd $project_name
|
||||||
|
|
||||||
run sudo service postgresql start
|
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"
|
surun "python3 -W ignore manage.py migrate $noinput"
|
||||||
if [[ $noinput == '--noinput' ]]; then
|
if [[ $noinput == '--noinput' ]]; then
|
||||||
# Create orchestra superuser
|
# Create orchestra superuser
|
||||||
|
|
Loading…
Reference in New Issue