Fixes on deploy.sh
This commit is contained in:
parent
ce42242cb0
commit
e97ae69d3c
|
@ -85,16 +85,20 @@ if [[ ! $(sudo su postgres -c "psql -lqt" | awk {'print $1'} | grep '^orchestra$
|
||||||
sudo su postgres -c 'psql -c "ALTER USER orchestra CREATEDB;"'
|
sudo su postgres -c 'psql -c "ALTER USER orchestra CREATEDB;"'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# admin_tools needs accounts and does not have migrations
|
# admin_tools needs accounts and does not have migrations
|
||||||
run "$PYTHON_BIN $MANAGE migrate --noinput accounts"
|
if [[ ! $(sudo su postgres -c "psql orchestra -q -c 'SELECT * FROM accounts_account LIMIT 1;' 2> /dev/null") ]]; then
|
||||||
run "$PYTHON_BIN $MANAGE migrate --noinput"
|
run "$PYTHON_BIN $MANAGE migrate --noinput accounts"
|
||||||
|
run "$PYTHON_BIN $MANAGE migrate --noinput"
|
||||||
|
else
|
||||||
|
$PYTHON_BIN $MANAGE postupgradeorchestra --from $CURRENT_VERSION
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [[ $CELERY == true ]]; then
|
if [[ $CELERY == true ]]; then
|
||||||
run apt-get install -y rabbitmq
|
run apt-get install -y rabbitmq
|
||||||
sudo $PYTHON_BIN $MANAGE setupcelery --username $USER --processes 2
|
sudo $PYTHON_BIN $MANAGE setupcelery --username $USER --processes 2
|
||||||
else
|
else
|
||||||
run "$PYTHON_BIN $MANAGE setupcronbeat"
|
surun "$PYTHON_BIN $MANAGE setupcronbeat"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue