Skip to content

Commit

Permalink
add docker-entrypoint script used in Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Paula Kammler committed Dec 7, 2023
1 parent c2233bf commit bad1e93
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

echo "Flush the manage.py command if any"

while ! python manage.py flush --no-input 2>&1; do
echo "Flushing django manage command"
sleep 3
done

echo "Migrate the database at startup of project"

while ! python manage.py migrate 2>&1; do
echo "Migration is in progress status"
sleep 3
done

echo "Django docker is fully configured successfully."

exec "$@"

0 comments on commit bad1e93

Please sign in to comment.