]> git.parisson.com Git - telemeta.git/commitdiff
fix init, use bash
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Wed, 13 Apr 2016 22:45:14 +0000 (00:45 +0200)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Wed, 20 Apr 2016 21:27:05 +0000 (23:27 +0200)
Conflicts:
telemeta/pages

app/scripts/app.sh
app/scripts/worker.sh
app/worker.py
docker-compose.yml
env/dev.yml

index c78b275b6ded5df28582052301617c9f6178ad52..747a5c4783a345092536ba321d40a4a7bdd89b36 100644 (file)
@@ -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
index 9aa312f5bb78543c23733bf246d8ff085222fea4..f141f24ee3fa9b95245fd8770cac664f9389ffea 100644 (file)
@@ -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
index 6d06656d1bec574a9ee2b6715c2d03dad86e024d..7e52b6d2c361b921a1a7898f215d4f0123751056 100644 (file)
@@ -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):
index a6cef527714afdb7fe3fe609696bf68391071596..159b94fd6ca8a5b488ae1a6ff2d8a1fcefad8fae 100644 (file)
@@ -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
index 9d154dc74a1ec3e330d98d0621dc2ee227062080..4b22a6fcde38a22a5221fc3398635ec838964b18 100644 (file)
@@ -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