From: Guillaume Pellerin Date: Wed, 13 Apr 2016 22:45:14 +0000 (+0200) Subject: fix init, use bash X-Git-Tag: 1.6.2^2~43 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=a9a6f576fd1d5cf2480ab858413a9de81979aaf1;p=telemeta.git fix init, use bash --- diff --git a/app/scripts/app.sh b/app/scripts/app.sh index c78b275b..747a5c47 100644 --- a/app/scripts/app.sh +++ b/app/scripts/app.sh @@ -29,20 +29,19 @@ python $manage migrate --noinput python $manage bower_install -- --allow-root python $manage collectstatic --noinput -if [ $DEBUG = "False" ] -then +if [ ! -f .init ]; then + chown -R www-data:www-data $media + python $manage telemeta-create-admin-user + python $manage telemeta-create-boilerplate + touch .init +fi + +if [ $DEBUG = "False" ]; then python $manage update_index --workers $processes & - if [ ! -f .init ] - then - chown -R www-data:www-data $media - python $manage telemeta-create-admin-user - python $manage telemeta-create-boilerplate - touch .init - fi fi -if [ $1 = "--runserver" ] -then + +if [ $1 = "--runserver" ]; then python $manage runserver_plus 0.0.0.0:8000 else # static files auto update diff --git a/app/scripts/worker.sh b/app/scripts/worker.sh index 9aa312f5..f141f24e 100644 --- a/app/scripts/worker.sh +++ b/app/scripts/worker.sh @@ -9,7 +9,7 @@ wsgi=$app'/wsgi.py' # pip install django-environ redis # waiting for other services -sh $app/scripts/wait.sh +bash $app/scripts/wait.sh # Starting celery worker with the --autoreload option will enable the worker to watch for file system changes # This is an experimental feature intended for use in development only diff --git a/app/worker.py b/app/worker.py index 6d06656d..7e52b6d2 100644 --- a/app/worker.py +++ b/app/worker.py @@ -17,7 +17,7 @@ app.config_from_object('django.conf:settings') app.autodiscover_tasks(lambda: settings.INSTALLED_APPS) # app.conf.update( # CELERY_RESULT_BACKEND='djcelery.backends.database:DatabaseBackend', -# ) +# ) @app.task(bind=True) def debug_task(self): diff --git a/docker-compose.yml b/docker-compose.yml index a6cef527..159b94fd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -55,7 +55,7 @@ app: - data env_file: - env/prod.env - command: /bin/sh scripts/app.sh + command: /bin/bash scripts/app.sh links: - broker - db @@ -67,7 +67,7 @@ worker: - app env_file: - env/prod.env - command: /bin/sh scripts/worker.sh + command: /bin/bash scripts/worker.sh links: - broker - db diff --git a/env/dev.yml b/env/dev.yml index 9d154dc7..4b22a6fc 100644 --- a/env/dev.yml +++ b/env/dev.yml @@ -25,7 +25,7 @@ app: env_file: - env/debug.env - command: /bin/sh scripts/app.sh --runserver + command: /bin/bash scripts/app.sh --runserver ports: - 9000:8000 diff --git a/telemeta/pages b/telemeta/pages index 407d2d26..affaaa01 160000 --- a/telemeta/pages +++ b/telemeta/pages @@ -1 +1 @@ -Subproject commit 407d2d269d081176f8f7548d9e2371076eebc879 +Subproject commit affaaa01250e706004149c1cfeb5149b1b945507