forked from phoenix/litellm-mirror
build(Dockerfile): move prisma build to dockerfile
Seems to solve - https://github.com/BerriAI/litellm/issues/1321
This commit is contained in:
parent
6f9d3fc3bc
commit
2741835605
7 changed files with 149 additions and 37 deletions
28
retry_push.sh
Normal file
28
retry_push.sh
Normal file
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
|
||||
retry_count=0
|
||||
max_retries=3
|
||||
exit_code=1
|
||||
|
||||
until [ $retry_count -ge $max_retries ] || [ $exit_code -eq 0 ]
|
||||
do
|
||||
retry_count=$((retry_count+1))
|
||||
echo "Attempt $retry_count..."
|
||||
|
||||
# Run the Prisma db push command
|
||||
prisma db push --accept-data-loss
|
||||
|
||||
exit_code=$?
|
||||
|
||||
if [ $exit_code -ne 0 ] && [ $retry_count -lt $max_retries ]; then
|
||||
echo "Retrying in 10 seconds..."
|
||||
sleep 10
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $exit_code -ne 0 ]; then
|
||||
echo "Unable to push database changes after $max_retries retries."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Database push successful!"
|
Loading…
Add table
Add a link
Reference in a new issue