This commit is contained in:
Cayo Puigdefabregas 2021-01-29 11:44:10 +01:00
parent 0cde41042f
commit 24e75bc07f
2 changed files with 9 additions and 7 deletions

View File

@ -79,11 +79,11 @@ class Command(BaseCommand):
interactive = options.get('interactive')
db_password = options.get('db_password')
context = {
'db_name': options.get('db_name'),
'db_user': options.get('db_user'),
'db_name': options.get('db_name', 'orchestra'),
'db_user': options.get('db_user', 'orchestra'),
'db_password': db_password,
'db_host': options.get('db_host'),
'db_port': options.get('db_port'),
'db_host': options.get('db_host', '127.0.0.1'),
'db_port': options.get('db_port', '5432'),
'default_db_password': db_password or random_ascii(10),
}

View File

@ -69,8 +69,9 @@ function install_orchestra () {
if [[ -L /usr/local/bin/orchestra-admin || -f /usr/local/bin/orchestra-admin ]]; then
run sudo rm -f /usr/local/bin/{orchestra-admin,orchestra-beat}
fi
run sudo ln -s $home/django-orchestra/orchestra/bin/orchestra-admin /usr/local/bin/
run sudo ln -s $home/django-orchestra/orchestra/bin/orchestra-beat /usr/local/bin/
run sudo pip3 install -e $home/django-orchestra
#run sudo ln -s $home/django-orchestra/orchestra/bin/orchestra-admin /usr/local/bin/
#run sudo ln -s $home/django-orchestra/orchestra/bin/orchestra-beat /usr/local/bin/
run sudo orchestra-admin install_requirements --testing
else
# Install from pip
@ -84,7 +85,8 @@ function install_orchestra () {
function setup_database () {
dev=$1
noinput=$2
run sudo apt-get install -y postgresql python3-psycopg2
run sudo apt-get install -y postgresql
run sudo pip install psycopg2
# Setup Database
if [[ $dev ]]; then
# Speeding up tests, don't do this in production!