From: Guillaume Pellerin Date: Mon, 14 Dec 2015 17:16:02 +0000 (+0100) Subject: update index and create admin only at first startup X-Git-Tag: 1.6b~7^2~39^2~1 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=3e698c625f3be47ad6713f33895082827bd33481;p=telemeta.git update index and create admin only at first startup --- diff --git a/app/deploy/start_app.sh b/app/deploy/start_app.sh index 24c983a5..296b5e30 100644 --- a/app/deploy/start_app.sh +++ b/app/deploy/start_app.sh @@ -22,9 +22,13 @@ sh $app/deploy/wait.sh python $manage syncdb --noinput python $manage migrate --noinput python $manage collectstatic --noinput -python $manage telemeta-create-admin-user -python $manage telemeta-create-boilerplate -#python $manage update_index --workers $processes + +if [ ! -f $app/.init ]; then + python $manage telemeta-create-admin-user + python $manage telemeta-create-boilerplate + python $manage update_index --workers $processes + touch $app/.init +fi # static files auto update watchmedo shell-command --patterns="*.js;*.css" --recursive \ diff --git a/app/sandbox/settings.py b/app/sandbox/settings.py index 7a1937b2..6278efff 100644 --- a/app/sandbox/settings.py +++ b/app/sandbox/settings.py @@ -77,7 +77,6 @@ USE_L10N = True # # if not os.path.exists(MEDIA_ROOT): # os.makedirs(MEDIA_ROOT) - MEDIA_ROOT = '/opt/media/' # URL that handles the media served from MEDIA_ROOT. Make sure to use a @@ -289,7 +288,6 @@ CELERY_TASK_SERIALIZER = 'json' CELERY_RESULT_SERIALIZER = 'json' CELERY_ACCEPT_CONTENT = ['application/json'] - HAYSTACK_CONNECTIONS = { 'default': { 'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine',