]> git.parisson.com Git - telemeta.git/commitdiff
update index and create admin only at first startup
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Mon, 14 Dec 2015 17:16:02 +0000 (18:16 +0100)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Mon, 14 Dec 2015 17:16:02 +0000 (18:16 +0100)
app/deploy/start_app.sh
app/sandbox/settings.py

index 24c983a5348fbefc5a6033dd067cc8a0538f1340..296b5e3078aa897ee011ec42fab926de74b70efb 100644 (file)
@@ -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 \
index 7a1937b2dfed0d7bb7a4b1186ca7030cfd89308c..6278efffb10652d397e28dcb20fb97eb7155b1cd 100644 (file)
@@ -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',