From 305462e7a56a8b0e636c9946d71248ba4037f63a Mon Sep 17 00:00:00 2001 From: Vinicius Date: Tue, 15 Aug 2023 17:13:52 -0300 Subject: [PATCH] feat: rebuild elastic search index after deploy --- start-server.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/start-server.sh b/start-server.sh index 0ca7d565..08f565ce 100755 --- a/start-server.sh +++ b/start-server.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash # start-server.sh -python manage.py makemigrations && python manage.py migrate if [ -n "$DJANGO_SUPERUSER_USERNAME" ] && [ -n "$DJANGO_SUPERUSER_PASSWORD" ] ; then (cd /app; python manage.py createsuperuser --no-input) fi -(cd /app; python manage.py makemigrations && python manage.py migrate) -(cd /app; gunicorn basedosdados_api.wsgi --user www-data --bind 0.0.0.0:8000 --workers 3 --log-level debug --timeout 180) & -nginx -g "daemon off;" +(cd /app; python manage.py makemigrations) +(cd /app; python manage.py migrate) +(cd /app; python manage.py update_index --remove) +(cd /app; gunicorn basedosdados_api.wsgi --user www-data --bind 0.0.0.0:8000 --workers 3 --log-level debug --timeout 180) & nginx -g "daemon off;"