Skip to content

Commit

Permalink
feat: rebuild elastic search index after deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
vncsna committed Aug 15, 2023
1 parent 5a3d4e7 commit 305462e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions start-server.sh
Original file line number Diff line number Diff line change
@@ -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;"

0 comments on commit 305462e

Please sign in to comment.