From 9773dbcc748f9b9838630389976d05cf20b50bfb Mon Sep 17 00:00:00 2001 From: "Qijia \"Joy\" Liu" Date: Sun, 24 Oct 2021 12:54:13 -0400 Subject: [PATCH] Add RUN_POPULATE check to run manage.py populate --- docker/django-base/django-run | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docker/django-base/django-run b/docker/django-base/django-run index 52f22c63..416f2444 100755 --- a/docker/django-base/django-run +++ b/docker/django-base/django-run @@ -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 \ No newline at end of file