From e0c0cab53843367f650b0e501636e882ed8edd00 Mon Sep 17 00:00:00 2001 From: Alex de Landgraaf Date: Fri, 5 Jul 2024 11:13:08 +0200 Subject: [PATCH] Update docker_start.sh Taken from open_zaak Dockerfile --- bin/docker_start.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/bin/docker_start.sh b/bin/docker_start.sh index 8b36948cfd..f18f365164 100755 --- a/bin/docker_start.sh +++ b/bin/docker_start.sh @@ -24,6 +24,17 @@ done >&2 echo "Apply database migrations" python src/manage.py migrate +# Load any JSON fixtures present +if [ -d $fixtures_dir ]; then + echo "Loading fixtures from $fixtures_dir" + + for fixture in $(ls "$fixtures_dir/"*.json) + do + echo "Loading fixture $fixture" + python src/manage.py loaddata $fixture + done +fi + # Start server >&2 echo "Starting server" exec uwsgi \