From 24e75bc07ff95835a0f4bf61390759bd9de5b86a Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Fri, 29 Jan 2021 11:44:10 +0100 Subject: [PATCH] fixed pg --- orchestra/management/commands/setuppostgres.py | 8 ++++---- scripts/containers/orchestra-deploy | 8 +++++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/orchestra/management/commands/setuppostgres.py b/orchestra/management/commands/setuppostgres.py index 3b552de6..4dbaeb26 100644 --- a/orchestra/management/commands/setuppostgres.py +++ b/orchestra/management/commands/setuppostgres.py @@ -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), } diff --git a/scripts/containers/orchestra-deploy b/scripts/containers/orchestra-deploy index 1b936e80..c5203e1a 100644 --- a/scripts/containers/orchestra-deploy +++ b/scripts/containers/orchestra-deploy @@ -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!