Perfect the entrypoint

Previously unexplored entrypoint technology has been explored. Now we
can run commands after the entrypoint completes with the magical "$@"
variable.
This commit is contained in:
ducoterra
2021-03-24 09:15:29 -06:00
parent 11dc31660d
commit b43927c384
9 changed files with 34 additions and 186 deletions

22
scripts/entrypoint.sh Executable file
View File

@@ -0,0 +1,22 @@
#!/bin/bash
if ! $SKIP_ENTRYPOINT || [ -z $SKIP_ENTRYPOINT ]; then
MIGRATED=false
while ! $MIGRATED; do
echo "Migrating..."
python manage.py migrate 2> /dev/null
if [ $? -eq 0 ]; then
MIGRATED=true
else
echo "ERROR - $(date) - Migrate failed."
sleep 1
fi
done
fi
$@