Fixes on deployment

This commit is contained in:
Marc Aymerich 2015-10-02 11:20:52 +00:00
parent 553889e625
commit 4fd3fdc664
3 changed files with 8 additions and 7 deletions

View file

@ -54,7 +54,7 @@ Django-orchestra can be installed on any Linux system, however it is **strongly
2. Use celeryd
```bash
sudo apt-get install rabbitmq
sudo apt-get install rabbitmq-server
sudo python3 manage.py setupcelery --username orchestra
```

View file

@ -84,7 +84,8 @@ class Command(BaseCommand):
raise CommandError("Postgres user '%(db_user)s' already exists and "
"--db_pass has not been provided." % context)
else:
msg = "Created new Postgres user '%(db_user)s' with password '%(default_db_password)s'"
context['db_password'] = context['default_db_password']
msg = "Created new Postgres user '%(db_user)s' with password '%(db_password)s'"
self.stdout.write(msg % context)
self.run_postgres(create_database % context, valid_codes=(0,1))

View file

@ -43,7 +43,7 @@ function main () {
read -p "Do you want to use celery or cronbeat (orchestra.contrib.tasks) for task execution [cronbeat]? " task
case $task in
'celery' ) task=celery; break;;
'orchestra.contrib.tasks' ) task=orchestra.contrib.tasks; break;;
'cronbeat' ) task=orchestra.contrib.tasks; break;;
'' ) task=orchestra.contrib.tasks; break;;
* ) echo "Please answer celery or cronbeat.";;
esac
@ -63,12 +63,12 @@ function main () {
run python3 -W ignore manage.py migrate
if [[ "$task" == "cronbeat" ]]; then
if [[ "$task" == "celery" ]]; then
run sudo apt-get install rabbitmq-server
run sudo python3 -W ignore manage.py setupcelery --username $USER
else
run python3 -W ignore manage.py setupcronbeat
run python3 -W ignore manage.py syncperiodictasks
else
run sudo apt-get install rabbitmq
run sudo python3 -W ignore manage.py setupcelery --username $USER
fi
run sudo python3 -W ignore manage.py setuplog --noinput