Files
azionelab-v2/backend/entrypoint.sh
T

16 lines
300 B
Bash

#!/bin/sh
set -eu
attempt=1
until python manage.py migrate --noinput; do
if [ "$attempt" -ge 10 ]; then
echo "Database migrations failed after $attempt attempts." >&2
exit 1
fi
attempt=$((attempt + 1))
sleep 2
done
python manage.py collectstatic --noinput
exec "$@"