Skip to content

Commit

Permalink
Add RUN_POPULATE check to run manage.py populate
Browse files Browse the repository at this point in the history
  • Loading branch information
joyliu-q committed Oct 24, 2021
1 parent 7d4fd82 commit 9773dbc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docker/django-base/django-run
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,10 @@
# Django Migrate
/usr/local/bin/python3 /app/manage.py migrate --noinput

# If RUN_POPULATE is set, run populate
if [[ ! -z "${RUN_POPULATE}" ]]; then
/usr/local/bin/python3 /app/manage.py populate
fi

# Run UWSGI
exec /usr/local/bin/uwsgi --ini /app/setup.cfg
exec /usr/local/bin/uwsgi --ini /app/setup.cfg

0 comments on commit 9773dbc

Please sign in to comment.