Files
azionelab-v2/backend/entrypoint.sh
T
2026-06-24 11:26:00 +02:00

16 lines
328 B
Bash

#!/bin/sh
set -eu
attempt=1
until python manage.py migrate --noinput --verbosity 0; 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 --verbosity 0
exec "$@"