Previously unexplored entrypoint technology has been explored. Now we can run commands after the entrypoint completes with the magical "$@" variable.
23 lines
273 B
Bash
Executable File
23 lines
273 B
Bash
Executable File
#!/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
|
|
|
|
$@
|