Skip to content

Commit 9773dbc

Browse files
committed
Add RUN_POPULATE check to run manage.py populate
1 parent 7d4fd82 commit 9773dbc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

docker/django-base/django-run

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,10 @@
33
# Django Migrate
44
/usr/local/bin/python3 /app/manage.py migrate --noinput
55

6+
# If RUN_POPULATE is set, run populate
7+
if [[ ! -z "${RUN_POPULATE}" ]]; then
8+
/usr/local/bin/python3 /app/manage.py populate
9+
fi
10+
611
# Run UWSGI
7-
exec /usr/local/bin/uwsgi --ini /app/setup.cfg
12+
exec /usr/local/bin/uwsgi --ini /app/setup.cfg

0 commit comments

Comments
 (0)